moss.net
Class MSocket

java.lang.Object
  extended by moss.net.MSocket

public class MSocket
extends java.lang.Object

this class provides the various socket mechanisms required of MOSS


Field Summary
static int PF_INET
          internet/IP based sockets
static int PF_UNIX
          unix domain sockets
static int SOCK_DGRAM
          packet-based UDP socket
static int SOCK_STREAM
          stream-based TCP sockets
 
Constructor Summary
MSocket()
           
 
Method Summary
static int make_endpoint(MFile handle, int domain, int type)
          creates a new socket endpoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PF_INET

public static final int PF_INET
internet/IP based sockets

See Also:
Constant Field Values

PF_UNIX

public static final int PF_UNIX
unix domain sockets

See Also:
Constant Field Values

SOCK_STREAM

public static final int SOCK_STREAM
stream-based TCP sockets

See Also:
Constant Field Values

SOCK_DGRAM

public static final int SOCK_DGRAM
packet-based UDP socket

See Also:
Constant Field Values
Constructor Detail

MSocket

public MSocket()
Method Detail

make_endpoint

public static int make_endpoint(MFile handle,
                                int domain,
                                int type)
creates a new socket endpoint. This does very little until the socket is actually actioned in some way (e.g. listen/connect/receive)

Parameters:
handle - file-handle that will be associated with the socket endpoint
domain - domain of this socket (PF_...)
type - type of this socket (SOCK_...)
Returns:
0 on success, or < 0 indicating error