next up previous contents index
Next: 10.2.1 oskit_socket_factory_t: socket factories Up: 10 OSKit Networking Framework Previous: 10.1 Introduction

10.2 oskit_socket: Socket Interface

 

The oskit_socket COM interface defines an interface which capture the semantics of a socket as defined in the corresponding POSIX/CAE standards. The oskit_socket COM interface inherits from oskit_posixio. It can be queried for an oskit_stream interface. This query will always be successful, but the resulting oskit_stream instance might not support all methods. Generally, at least read and write will be supported. The oskit_socket COM interface provides in addition to the oskit_posixio COM interface the following methods:

accept
accept a connection on a socket

bind
bind a name to a socket

connect
initiate a connection on a socket

shutdown
shut down part of a full-duplex connection

listen
listen for connections on a socket

getsockname
get socket name

getpeername
get name of connected peer

getsockopt
get options on sockets

setsockopt
set options on sockets

sendto
send a message from a socket

recvfrom
receive a message from a socket

sendmsg
send a message from a socket

recvmsg
receive a message from a socket

Note that these methods are not minimal, but correspond very closely to the traditional BSD interfaces.

Note: the following paragraphs have a certain likelihood to change. The main reason for this is the obviously undesirable connection between the way socket factories and the socket interface interact. On a more positive note, everything right now is so close to the BSD interfaces that the reader familiar with those shouldn't have any problems understanding these.





Utah Flux Research Group