{
StructModule struct_ = (StructModule)client.getModule("struct");
String result = getsockopt(SocketModule.SOL_SOCKET,
SocketModule.SO_LINGER,
struct_.calcsize("ii"));
Object[] unpacked = struct_.unpack("ii", result);
if (unpacked[0].equals(new Integer(0)))
return -1;
return ((Number)unpacked[1]).intValue();
}