SophiaFramework UNIVERSE 5.3 |
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
O | O | O | O |
Public Functions | |
---|---|
SFCError |
Accept(
SFBSocketSmpPtr socket
)
The accept function is used on a listening TCP socket to retrieve an incoming connection.
|
SFCError |
Bind(
INAddr addr
, INPort port
)
Associate a local address and port with the socket.
The bind function is used on an unconnected socket.
|
SFCError |
Bind(
SFXSocketAddressConstRef dest
)
Associate a local address and port with the socket.
The bind function is used on an unconnected socket.
|
Void |
Cancel(
PFNNOTIFY notify = null
, VoidPtr data = null
) This function allows an application to cancel (un-register) a callback function
that has been previously registered using SFBSocket::Readable(), SFBSocket::Writeable().
|
SFCError |
Close( Void )
Causes a socket to be closed. In the case of TCP, any connection will be terminated gracefully.
|
SFCError |
Connect(
INAddr addr
, INPort port
, PFNCONNECTCB notify
, VoidPtr data = null
)
Attempt to initiate a TCP connection to the specified address and port.
|
SFCError |
Connect(
SFXSocketAddressConstRef dest
, PFNCONNECTCB notify
, VoidPtr data = null
)
Attempt to initiate a TCP connection to the specified address and port.
|
Void |
DbgMark(
ACharConstPtr file
, UInt32 line
)
Mark an ISocket with __FILE__ and __LINE__ for debugging purposes.
|
SFCError |
GetLastError( Void ) Return the last error that occurred with the given Socket.
|
SFCError |
GetOpt(
SInt32 level
, SInt32 optName
, VoidPtr optVal
, SInt32Ptr optSize
) Get options for a socket.
|
SFCError |
GetOpt(
SInt32 level
, SInt32 optName
, SFXBufferPtr opt
) Get options for a socket.
|
SFCError |
GetPeerName(
INAddr* addr
, INPort* port
)
Return the remote IP address and port of the connected peer.
|
SFCError |
GetPeerName(
SFXSocketAddressPtr dest
)
Return the remote IP address and port of the connected peer.
|
SFXSocketAddress |
GetPeerName( Void )
Return the remote IP address and port of the connected peer.
|
SFCError |
GetSDBAckInfo(
AEESDBAckInfo * info
) Get information received by SDB Ack.
|
SFCError |
GetSockName(
INAddr* addr
, INPort* port
)
Return the local IP address and port of the socket.
|
SFCError |
GetSockName(
SFXSocketAddressPtr dest
)
Return the local IP address and port of the socket.
|
SFXSocketAddress |
GetSockName( Void )
Return the local IP address and port of the socket.
|
SFCError |
IOCtl(
SInt32 option
, UInt32 value
) Control over the behavior of an ISocket, for example connect time-outs.
|
SFCError |
Listen(
SInt32 maxPending
)
Perform a passive open for connections,
|
SInt32 |
ReadV(
SockIOBlock* ioblocks
, UInt16 count
)
Read data from a socket into one or more buffers.
|
SFCError |
Realize( Void )
Acquires an IP address and ensures that the underlying network layer is ready for communication.
|
SInt32 |
RecvFrom(
VoidPtr buff
, UInt16 bytes
, UInt16 flags
, INAddr* addr
, INPort* port
) Read data from UDP socket and records the IP address and port of the sender if non-null.
|
SInt32 |
RecvFrom(
SFXBufferPtr buff
, UInt16 flags
, INAddr* addr
, INPort* port
) Read data from UDP socket and records the IP address and port of the sender if non-null.
|
SInt32 |
RecvFrom(
VoidPtr buff
, UInt16 bytes
, UInt16 flags
, SFXSocketAddressPtr sender
) Read data from UDP socket and records the IP address and port of the sender if non-null.
|
SInt32 |
RecvFrom(
SFXBufferPtr buff
, UInt16 flags
, SFXSocketAddressPtr sender
) Read data from UDP socket and records the IP address and port of the sender if non-null.
|
SInt32 |
SendTo(
VoidPtr buff
, UInt16 bytes
, UInt16 flags
, INAddr addr
, INPort port
) Send a UDP packet to the specified IP address and port from the local port bound to the socket.
|
SInt32 |
SendTo(
SFXBufferPtr buff
, UInt16 flags
, INAddr addr
, INPort port
) Send a UDP packet to the specified IP address and port from the local port bound to the socket.
|
SInt32 |
SendTo(
VoidPtr buff
, UInt16 bytes
, UInt16 flags
, SFXSocketAddressConstRef dest
) Send a UDP packet to the specified IP address and port from the local port bound to the socket.
|
SInt32 |
SendTo(
SFXBufferPtr buff
, UInt16 flags
, SFXSocketAddressConstRef dest
) Send a UDP packet to the specified IP address and port from the local port bound to the socket.
|
SFCError |
SetOpt(
SInt32 level
, SInt32 optName
, VoidPtr optVal
, SInt32 optSize
) Set options for a socket.
|
SFCError |
SetOpt(
SInt32 level
, SInt32 optName
, SFXBufferConstRef opt
) Set options for a socket.
|
SFCError |
Shutdown(
SInt32 how
)
Cause all or part of a full-duplex connection to be terminated gracefully.
|
SInt32 |
Write(
VoidPtr buff
, UInt32 bytes
) Write data to a connected socket from a single buffer.
|
SInt32 |
Write(
SFXBufferPtr buff
) Write data to a connected socket from a single buffer.
|
SInt32 |
WriteV(
SockIOBlock* ioblocks
, UInt16 count
) Write data to a connected socket.
|
Void |
Writeable(
PFNNOTIFY notify
, VoidPtr data = null
)
Register a callback function to be invoked by the AEE
when a non-blocking write operation on the specified socket can make progress.
|
SInt32 |
Read(
VoidPtr buffer
, UInt32 count
)
(inherits from SFBAStream)
Attempt to read data from a stream, and returns the number of bytes read. If no data is available for reading, it returns the value AEE_STREAM_WOULDBLOCK.
|
SInt32 |
Read(
SFXBufferPtr buffer
)
(inherits from SFBAStream)
Attempt to read data from a stream, and returns the number of bytes read. If no data is available for reading, it returns the value AEE_STREAM_WOULDBLOCK.
|
Void |
Readable(
PFNNOTIFY notify
, VoidPtr data = null
)
(inherits from SFBAStream)
Register a callback that checks whether data is available to be read. It is called when the SFBAStream::Read() returns AEE_STREAM_WOULDBLOCK.
|
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( SFBSocketSmpPtr socket // pointer to the newly accepted SFBSocket interface );
Supported in BREW 2.1 or later.
BREW API ISOCKET_Accept | SFBSocket::Listen | SFBAStream::Readable
[ public ] SFCError Bind( INAddr addr // IP Address INPort port // port );
[ public ] SFCError Bind( SFXSocketAddressConstRef dest // IP Address and Port );
[ public ] Void Cancel( PFNNOTIFY notify = null // pointer to the callback function that needs to be cancelled VoidPtr data = null // callback data that was used to register the callback );
[ public ] SFCError Close(Void);
Supported in BREW 2.1 or later.
BREW API ISOCKET_Close | SFBAStream::Readable | SFBSocket::Writeable
[ public ] SFCError Connect( INAddr addr // IP Address INPort port // port PFNCONNECTCB notify // address of the callback function that is invoked // by AEE when the connect operation either succeeds or fails VoidPtr data = null // user-defined data that is passed to the callback function when it is invoked );
[ public ] SFCError Connect( SFXSocketAddressConstRef dest // IP Address and Port PFNCONNECTCB notify // address of the callback function that is invoked // by AEE when the connect operation either succeeds or fails VoidPtr data = null // user-defined data that is passed to the callback function when it is invoked );
[ public ] Void DbgMark( ACharConstPtr file // __FILE__ UInt32 line // __LINE__ );
Supported in BREW 2.1 or later.
[ public ] SFCError GetLastError(Void);
[ public ] SFCError GetOpt( SInt32 level // option level (see AEESockOpt) SInt32 optName // option name (see AEESockOpt) VoidPtr optVal // pointer to the data type appropriate for the option SInt32Ptr optSize // pointer to size of optVal );
[ public ] SFCError GetOpt( SInt32 level // option level (see AEESockOpt) SInt32 optName // option name (see AEESockOpt) SFXBufferPtr opt // pointer to the buffer appropriate for the option );
This function is available in BREW 3.1.
BREW API ISOCKET_GetOpt | SFBSocket::SetOpt | SFBAStream::Readable
[ public ] SFCError GetPeerName( INAddr* addr // pointer to the IP Address in network byte order INPort* port // pointer to the port in network byte order );
[ public ] SFCError GetPeerName( SFXSocketAddressPtr dest // pointer to the SFXSocketAddress );
[ public ] SFXSocketAddress GetPeerName(Void);
[ public ] SFCError GetSDBAckInfo( AEESDBAckInfo * info // pointer to a AEESDBAckInfo structure );
Introduced BREW Client 3.1.5 SP01 or 4.0.2
[ public ] SFCError GetSockName( INAddr* addr // pointer to the IP Address t in network byte order INPort* port // pointer to the IP Address t in network byte order );
[ public ] SFCError GetSockName( SFXSocketAddressPtr dest // pointer to the SFXSocketAddress );
[ public ] SFXSocketAddress GetSockName(Void);
Supported in Brew 2.1 or later.
Supported in Brew 2.1 or later.
BREW API ISOCKET_Listen | SFBSocket::Accept | SFBSocket::Writeable
[ public ] SInt32 ReadV( SockIOBlock* ioblocks // array of SockIOBlock structures into which data can be read UInt16 count // specifies the number of entries in the iov array );
[ public ] SFCError Realize(Void);
Supported in Brew 2.1 or later.
[ public ] SInt32 RecvFrom( VoidPtr buff // buffer to hold the received data UInt16 bytes // size of the buffer, in terms of number of bytes UInt16 flags // unused, must be set to 0 INAddr* addr // pointer to the IP Address in network byte order INPort* port // pointer to the port in network byte order );
[ public ] SInt32 RecvFrom( SFXBufferPtr buff // buffer to hold the received data, // the size is converted into UInt16 when called by API UInt16 flags // unused, must be set to 0 INAddr* addr // pointer to the IP Address in network byte order INPort* port // pointer to the port in network byte order );
[ public ] SInt32 RecvFrom( VoidPtr buff // buffer to hold the received data UInt16 bytes // size of the buffer, in terms of number of bytes UInt16 flags // unused, must be set to 0 SFXSocketAddressPtr sender // the IP Address and Port of the sender );
[ public ] SInt32 RecvFrom( SFXBufferPtr buff // buffer to hold the received data, // the size is converted into UInt16 when called by API UInt16 flags // unused, must be set to 0 SFXSocketAddressPtr sender // the IP Address and Port of the sender );
[ public ] SInt32 SendTo( VoidPtr buff // buffer containing data to be sent UInt16 bytes // size of the buffer, in terms of number of bytes UInt16 flags // unused, must be set to 0 INAddr addr // IP Address INPort port // port );
[ public ] SInt32 SendTo( SFXBufferPtr buff // buffer containing data to be sent. 3 // if null, do nothing and return AEE_NET_ERROR UInt16 flags // unused, must be set to 0 INAddr addr // IP Address INPort port // port );
[ public ] SInt32 SendTo( VoidPtr buff // buffer containing data to be sent UInt16 bytes // size of the buffer, in terms of number of bytes UInt16 flags // unused, must be set to 0 SFXSocketAddressConstRef dest // IP Address and Port of the destination );
[ public ] SInt32 SendTo( SFXBufferPtr buff // buffer containing data to be sent. // if null, do nothing and return AEE_NET_ERROR UInt16 flags // unused, must be set to 0 SFXSocketAddressConstRef dest // IP Address and Port of the destination );
[ public ] SFCError SetOpt( SInt32 level // option level (see AEESockOpt) SInt32 optName // option name (see AEESockOpt) VoidPtr optVal // pointer to the data type appropriate for the option SInt32 optSize // size of optVal );
[ public ] SFCError SetOpt( SInt32 level // option level (see AEESockOpt) SInt32 optName // option name (see AEESockOpt) SFXBufferConstRef opt // pointer to the data type appropriate for the option );
This function is available in BREW 3.1.
BREW API ISOCKET_SetOpt | SFBSocket::GetOpt | SFBSocket::Writeable
[ public ] SFCError Shutdown( SInt32 how // dictates which portion(s) of the connection to shutdown );
Supported in Brew 2.1 or later.
[ public ] SInt32 Write( VoidPtr buff // pointer to the buffer from which the data is sent UInt32 bytes // specifies the size of the buffer in terms of number of bytes in the buffer. // in BREW 2.0 it is of UInt16 );
[ public ] SInt32 Write( SFXBufferPtr buff // buffer // if null, do nothing and return AEE_NET_ERROR );
In BREW 2.0, the size value is converted into UInt16 when called by the API.
[ public ] SInt32 WriteV( SockIOBlock* ioblocks // an array of SockIOBlocks containing the individual buffers to be sent UInt16 count // number of entries inside the SockIOBlock structure );
[ public ] Void Writeable( PFNNOTIFY notify // address of the callback function. // this function is invoked by AEE when the socket becomes ready // to receive data or when it is ready to be closed. // if this is null, it cancels the Writeable callback function // registered by a previous call to SFBSOCKET::Writeable() VoidPtr data = null // user-defined data that is passed to the callback function when it is invoked );
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |