SophiaFramework UNIVERSE 5.3 |
#include <SFBSockPort.h.hpp>
class SFBSockPort : public SFBPort;
<link linkend="sec.macro.core.typedef.SFMTYPEDEFWRAPPER">SFMTYPEDEFWRAPPER</link>(SFBSockPort)
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
X | X | O | O |
Public Functions | |
---|---|
SFCError |
Accept(
SFBSockPortSmpPtr sockport
) The accept function is used on listening sockets to respond when AEE_NET_READ_EVENT is asserted.
|
SFCError |
Bind(
VoidConstPtr addr
) This function associates a local address and port with the socket. The bind function is used on an unconnected socket.
|
SFCError |
Connect(
VoidConstPtr addr
) For sockets of type AEE_SOCKPORT_STREAM, this attempts to initiate a TCP connection to the specified remote address.
|
Void |
DbgMark( Void ) Make the debug mark.
|
SFCError |
GetOpt(
SInt32 level
, SInt32 name
, VoidPtr value
, SInt32Ptr size
) Gets options for a socket.
|
SFCError |
GetOpt(
SInt32 level
, SInt32 name
, SFXBufferPtr value
) Gets options for a socket.
|
SFCError |
GetPeerName(
VoidPtr addr
, SInt32Ptr size
) This function returns the remote address of the connected socket.
|
SFCError |
GetPeerName(
SFXBufferPtr buffer
) This function returns the remote address of the connected socket.
|
SFCError |
GetSDBAckInfo(
AEESDBAckInfo * info
) Get the information regarding the last SDB acknowledgment that arrived for this socket.
|
SFCError |
GetSockName(
VoidPtr addr
, SInt32Ptr size
) This function returns the local address of the socket.
|
SFCError |
GetSockName(
SFXBufferPtr buffer
) This function returns the local address of the socket.
|
SFCError |
IsRealized(
BoolPtr realized
) Check if the socket is realized (bound).
|
SFCError |
Listen(
SInt32 backlog
) Performs a passive open for connections, such that incoming connections may be subsequently accepted.
|
static SFBSockPortSmp |
NewInstance(
SFCErrorPtr exception = null
) Create a new SFBSockPort instance.
|
static SFBSockPortSmp |
NewInstance(
AEECLSID id
, SFCErrorPtr exception = null
) Create a new SFBSockPort instance.
|
SFCError |
OpenEx(
UInt16 family
, AEESockType type
, SInt32 protocol
) Opens a SockPort for use with a specific address family, type and protocol.
|
SInt32 |
ReadV(
SockIOBlock * ioblocks
, UInt16 count
) This function reads data from a socket. It reads data into one or more buffers described by the entries in the iov[] array.
|
SFCError |
Realize( Void ) Acquire an IP address and ensures that the underlying network layer is ready for communication.
|
SInt32 |
RecvFrom(
ACharPtr buffer
, SInt32 length
, UInt32 flags
, VoidPtr addr
, SInt32Ptr size
) This functions reads data from datagram socket and records the address of the sender.
|
SInt32 |
RecvFrom(
SFXBufferPtr buffer
, UInt32 flags
, VoidPtr addr
, SInt32Ptr size
) This functions reads data from datagram socket and records the address of the sender.
|
SFCError |
RecvMsg(
AEESockMsgHdr * header
, UInt32 flags
) Read data from a datagram socket and records the address of the sender, similarly to RecvFrom().
|
SFCError |
SelectNetwork(
SInt32 network
) This function selects a specific data network.
|
SFCError |
SelectNetworkEx(
SInt32 network
, SInt16 family
) Select a specific data network.
|
SInt32 |
SendTo(
ACharConstPtr buffer
, SInt32 length
, UInt32 flags
, VoidConstPtr addr
) This function sends a datagram packet to the specified address from the local address bound to the socket.
|
SInt32 |
SendTo(
SFXAnsiStringConstRef buffer
, UInt32 flags
, VoidConstPtr addr
) This function sends a datagram packet to the specified address from the local address bound to the socket.
|
SInt32 |
SendTo(
SFXBufferConstRef buffer
, UInt32 flags
, VoidConstPtr addr
) This function sends a datagram packet to the specified address from the local address bound to the socket.
|
SFCError |
SetOpt(
SInt32 level
, SInt32 name
, VoidConstPtr value
, SInt32 size
) Sets options for a socket.
|
SFCError |
SetOpt(
SInt32 level
, SInt32 name
, SFXBufferConstRef value
) Sets options for a socket.
|
SFCError |
Shutdown(
SInt32 how
) Causes all or part of a full-duplex connection to be terminated gracefully.
|
SInt32 |
WriteV(
SockIOBlock const * ioblocks
, UInt16 count
) This function writes data to a connected socket.
|
SFCError |
Close( Void )
(inherits from SFBPort)
Close an opened port or stops a open in progress.
|
static Bool |
Exhausted(
SInt32 code
)
(inherits from SFBSource)
Determine if a SFBSource, a SFBPeek, or a SFBGetLine is out of data.
|
SFCError |
GetLastError( Void )
(inherits from SFBPort)
Return the last error that occurred with the SFBPort.
|
SFCError |
IOCtl(
SInt32 option
, UInt32 val
)
(inherits from SFBPort)
Allow some control over the behaviour of an SFBPort.
|
SFCError |
Open(
ACharConstPtr port
)
(inherits from SFBPort)
Open the specified prt.
|
SFCError |
Open(
SFXAnsiStringConstRef port
)
(inherits from SFBPort)
Open the specified prt.
|
SFCError |
QueryInterface(
AEECLSID clsid
, VoidHandle handle
)
(inherits from SFBQuery)
Ask an object for another API contract from the object in question.
|
SFCError |
QueryInterface(
AEECLSID clsid
, SFBBaseSmpPtr handle
)
(inherits from SFBQuery)
Ask an object for another API contract from the object in question.
|
SFBBaseSmp |
QueryInterface(
AEECLSID clsid
)
(inherits from SFBQuery)
Ask an object for another API contract from the object in question.
|
SInt32 |
Read(
VoidPtr buf
, SInt32 size
)
(inherits from SFBSource)
Copy bytes from the source stream to the specified buffer.
|
SInt32 |
Read(
SFXBufferPtr buf
)
(inherits from SFBSource)
Copy bytes from the source stream to the specified buffer.
|
Void |
Readable(
SFXCallbackPtr callback
)
(inherits from SFBSource)
Schedule a callback to be called when SFBSource::Read() is able to return something other than ISOURCE_WAIT.
|
Void |
Self(
AEECLSID clsidReq
, SFBQuerySmpPtr clone
, AEECLSID clsidImp
)
(inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
|
SFBQuerySmp |
Self(
AEECLSID clsidReq
, AEECLSID clsidImp
)
(inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
|
SInt32 |
Write(
ACharConstPtr port
, SInt32 bufSize
)
(inherits from SFBPort)
Copy bytes from the specified buffer to the source stream.
|
SInt32 |
Write(
SFXAnsiStringConstRef buf
)
(inherits from SFBPort)
Copy bytes from the specified buffer to the source stream.
|
SInt32 |
Write(
SFXBufferConstRef buf
)
(inherits from SFBPort)
Copy bytes from the specified buffer to the source stream.
|
Void |
Writeable(
SFXCallbackPtr callback
)
(inherits from SFBPort)
Schedule a function to be called when SFBPort::Write() would return something other than AEEPORT_WAIT.
|
Protected Functions | |
---|---|
static SFBBaseSmp |
FactoryByCreate(
AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface.
|
static SFBBaseSmp |
FactoryByQuery(
SFBQuerySmpConstRef query
, AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.
|
[ public ] SFCError Accept( SFBSockPortSmpPtr sockport // Pointer to the newly accepted SFBSockPort interface );
Other error codes are also possible.
Note that the IPORT_WAIT return value is used instead of an error return value and an AEE_NET_EWOULDBLOCK error code.
[ public ] SFCError Bind( VoidConstPtr addr // an opaque pointer to the address to bind to (see AEESockAddrStorage) );
Other error codes are also possible.
Note that the IPORT_WAIT return value is used instead of an error return value and an AEE_NET_EWOULDBLOCK error code.
Binding to a specific local IP address is not currently supported.
[ public ] SFCError Connect( VoidConstPtr addr // an opaque pointer to the address to connect to (see AEESockAddrStorage) );
Other error codes are also possible.
Note that the IPORT_WAIT return value is used instead of an error return value and an AEE_NET_EWOULDBLOCK error code.
ISockPort_Connect() with DGRAM sockets is not supported.
[ public ] Void DbgMark(Void);
[ public ] SFCError GetOpt( SInt32 level // option level (see AEESockOpt) SInt32 name // option name (see AEESockOpt) VoidPtr value // pointer to the data type appropriate for the option (see AEESockOpt) SInt32Ptr size // on input, pnOptSize specifies the size of pOptVal in bytes. On output, pnOptSize is set to the number of data bytes filled into value. );
[ public ] SFCError GetOpt( SInt32 level // option level (see AEESockOpt) SInt32 name // option name (see AEESockOpt) SFXBufferPtr value // pointer to the data type appropriate for the option (see AEESockOpt) );
Other error codes are also possible.
[ public ] SFCError GetPeerName( VoidPtr addr // an opaque pointer to the address to be filled in (see AEESockAddrStorage) SInt32Ptr size // a pointer to the size of the address );
[ public ] SFCError GetPeerName( SFXBufferPtr buffer // a pointer to the address to be filled in );
Other error codes are also possible.
[ public ] SFCError GetSDBAckInfo( AEESDBAckInfo * info // User-allocated struct for the retrieved information. );
Introduced BREW Client 3.1.5 SP01 or 4.0.2
[ public ] SFCError GetSockName( VoidPtr addr // an opaque pointer to the address to be filled in (see AEESockAddrStorage) SInt32Ptr size // a pointer to the size of the address. );
[ public ] SFCError GetSockName( SFXBufferPtr buffer // a pointer to the address to be filled in );
Other error codes are also possible.
[ public ] SFCError IsRealized( BoolPtr realized // pointer to a Bool value; set to true or false according to the socket's status. );
Introduced BREW Client 3.1.5 SP01
Other error codes are also possible.
[ public, static ] SFBSockPortSmp NewInstance( SFCErrorPtr exception = null // Error );
[ public, static ] SFBSockPortSmp NewInstance( AEECLSID id // Class ID SFCErrorPtr exception = null // Error );
[ public ] SFCError OpenEx( UInt16 family // address family (AEE_AF_*). If SFBSockPort::SelectNetwork() or SFBSockPort::SelectNetworkEx() was already called for this socket,family should match the address family that was requested for the network. AEESockType type // socket type SInt32 protocol // socket protocol (AEE_IPPROTO_*) or 0 to select the system's default for the given wFamily and nType combination );
Other error codes are also possible.
[ public ] SInt32 ReadV( SockIOBlock * ioblocks // an array of SockIoBlock structures into which data can be read UInt16 count // specifies the number of entries in the iov array );
Other error codes are also possible.
Note that the IPORT_WAIT return value is used instead of an error return value and an AEE_NET_EWOULDBLOCK error code.
[ public ] SFCError Realize(Void);
Introduced BREW Client 3.1.5 SP01
[ public ] SInt32 RecvFrom( ACharPtr buffer // buffer to hold the received data SInt32 length // size of the buffer, in bytes UInt32 flags // not used VoidPtr addr // a pointer to the address to be filled in (see AEESockAddrStorage) SInt32Ptr size // a pointer to the size of the address );
[ public ] SInt32 RecvFrom( SFXBufferPtr buffer // buffer to hold the received data UInt32 flags // not used VoidPtr addr // a pointer to the address to be filled in (see AEESockAddrStorage) SInt32Ptr size // a pointer to the size of the address );
Other error codes are also possible.
Note that the IPORT_WAIT return value is used instead of an error return value and an AEE_NET_EWOULDBLOCK error code.
[ public ] SFCError RecvMsg( AEESockMsgHdr * header // pointer to AEESockMsgHdr, used to pack parameters UInt32 flags // currently, only the SOCKPORT_FLAG_RECVMSG_ERRQUEUE flag is supported );
Introduced BREW Client 3.1.5 SP01 or 4.0.2
Other error codes are also possible.
Most applications will not need to explicitly select the network.
[ public ] SFCError SelectNetworkEx( SInt32 network // data network type (AEE_NETWORK_*) SInt16 family // network address family (AEE_AF_*). If SFBSockPort_OpenEx() was already called for this socket, family should match the address family that was requested for the socket. );
Other error codes are also possible.
This function deprecates SFBSockPort::SelectNetwork().
Introduced BREW Client 3.1.4
[ public ] SInt32 SendTo( ACharConstPtr buffer // buffer of data to send SInt32 length // size of the buffer, in bytes UInt32 flags // Data transport options VoidConstPtr addr // an opaque pointer to the address to send to (see AEESockAddrStorage) );
[ public ] SInt32 SendTo( SFXAnsiStringConstRef buffer // buffer of data to send UInt32 flags // Data transport options VoidConstPtr addr // an opaque pointer to the address to send to (see AEESockAddrStorage) );
[ public ] SInt32 SendTo( SFXBufferConstRef buffer // buffer of data to send UInt32 flags // Data transport options VoidConstPtr addr // an opaque pointer to the address to send to (see AEESockAddrStorage) );
Other error codes are also possible.
Note that the IPORT_WAIT return value is used instead of an error return value and an AEE_NET_EWOULDBLOCK error code.
[ public ] SFCError SetOpt( SInt32 level // option level (see AEESockOpt) SInt32 name // option name (see AEESockOpt) VoidConstPtr value // pointer to the data type appropriate for the option (see AEESockOpt) SInt32 size // size of value );
[ public ] SFCError SetOpt( SInt32 level // option level (see AEESockOpt) SInt32 name // option name (see AEESockOpt) SFXBufferConstRef value // pointer to the data type appropriate for the option (see AEESockOpt) );
Other error codes are also possible.
[ public ] SFCError Shutdown( SInt32 how // Dictates which portion(s) of the connection to shutdown );
Other error codes are also possible.
Note that the IPORT_WAIT return value is used instead of an error return value and an AEE_NET_EWOULDBLOCK error code.
[ public ] SInt32 WriteV( SockIOBlock const * ioblocks // an array of SockIoBlock structures into which data can be read UInt16 count // specifies the number of entries in the iov array );
Other error codes are also possible.
Note that the IPORT_WAIT return value is used instead of an error return value and an AEE_NET_EWOULDBLOCK error code.
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |