See accept: for the use of the optional parameter
aSocketAddress.
accept will not solicit the address of the connecting socket at acceptance time. However, you can send
getPeerName to obtain the address later.
If the accept operation is unsucessful, it will return an error if one or more of the following is true: ENOTINITIALISED, ENETDOWN, EBADF, ENOTSOCK, EOPNOTSUPP, EWOULDBLOCK, EINPROGRESS, EINTR, EINVAL, EMFILE, ENOBUFS, EACCES. For detailed information on these errors, see
Error values.
The parameter aSocketAddress is a new instance of
SciSocketAddress. If an accept is successful
aSocketAddress will then contain the address of the connecting socket. If you want a nil
aSocketAddress, then use
accept.
If possible, an accept: on a blocking socket will block the current Smalltalk process. (If the current process is in a callback, an EACCES error is returned.) A blocking accept in the context of the UI Process is not recommended as it will disable the User Interface for the duration of the blocking call.
If the accept: operation is unsucessful, it will return an error if one or more of the following is true: ENOTINITIALISED, ENETDOWN, EBADF, ENOTSOCK, EOPNOTSUPP, EWOULDBLOCK, EINPROGRESS, EINTR, EINVAL, EMFILE, ENOBUFS, EACCES. For detailed information on these errors, see
Error values.
The parameter aSocketAddress contains a valid address, port and family.
If any of the following are true, the bind: aSocketAddress operation returns an error: ENOTINITIALISED, ENETDOWN, EBADF, ENOTSOCK, EAFNOSUPPORT, EADDRNOTAVAIL, EADDRINUSE, EINVAL, ENOBUFS, EACCES. For detailed information on these errors, see
Error values.
If any of the following occurs, the connect: aSocketAddress operation returns an error: ENOTINITIALISED, ENETDOWN, EBADF, ENOTSOCK, EADDRNOTAVAIL, EDESTADDREQ, EAFNOSUPPORT, ENETDOWN, EISCONN, ETIMEDOUT, ECONNREFUSED, ENETUNREACH, EADDRINUSE, ENOBUFS, EMFILE, EINPRORESS, EINVAL, EINTR, EWOULDBLOCK, EACCES. For detailed information on these errors, see
Error values.
The ioctl: operation performs a variety of control operations on the receiver.
If controlOperation is FIONBIO, a true sets the socket to be non-blocking. A false or nil sets the socket to be blocking. The default mode is blocking.
The ioctl: operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EBADF, EINTR, EINVAL, ENOTSOCK, EINPROGRESS.. For detailed information on these errors, see
Error values.
The listen operation performs the following:
The listen: backLog operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EADDRINUSE, EINVAL, EISCONN, EMFILE, ENOBUFS, EINPROGRESS, EBADF, ENOTSOCK, EOPNOTSUPP, ECONNREFUSED.. For detailed information on these errors, see
Error values.
The recv operation receives data from a connected socket.
The recv operation returns the length of the data received. If a data is too long to fit in the supplied buffer, excess bytes may be truncated if the receiver is a datagram socket.
If no data is available at the socket, the recv operation blocks the current process while waiting for data to arrive, unless the socket is non blocking. If a socket is non blocking, the operation returns an error (EWOULDBLOCK).
If possible, a recv on a blocking socket will block the current Smalltalk process. (If the current process is in a callback, an EACCES error is returned.) A blocking
recv in the context of the UI Process is not recommended as it will disable the User Interface for the duration of the blocking call.
The recv: aBuffer length: length startingAt: index flags: flags operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, ENOTCONN, EINPROGRESS, EOPNOTSUPP, ESHUTDOWN, EBADF, ENOTSOCK, EWOULDBLOCK, EMSGSIZE, EINVAL, ECONNABORTED, ECONNRESET, EINTR, EACCES. For detailed information on these errors, see
Error values.
The recvAll operation receives data from a connected socket. If multiple receives are required to receive the
length, the message will be broken into message segments and received. The
recvAll operation will block at the current Smalltalk process level until the operation is completed or returns with an error code. A
recvAll in the context of the UI Process is not recommended as it will disable the User Interface for the duration of the blocking call.
The recvAll operation returns a 0 if successfully received
length bytes or returns a SciError.
The recvAll: aBuffer length: length startingAt: index flags: flags operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, ENOTCONN, EINPROGRESS, EOPNOTSUPP, ESHUTDOWN, EBADF, ENOTSOCK, EWOULDBLOCK, EMSGSIZE, EINVAL, ECONNABORTED, ECONNRESET, EINTR, EACCES. For detailed information on these errors, see
Error values.
The recvFrom operation allows an application to receive data from connected and unconnected sockets. The
recvFrom operation specifies the source of the data to be received allowing the data to be received from unconnected sockets.
If no data is available at the socket, the recvFrom operation blocks the current process while waiting for data to arrive, unless the socket is non blocking. If a socket is non blocking, the operation returns an error (EWOULDBLOCK).
If possible, a recvFrom on a blocking socket will block the current Smalltalk process. (If the current process is in a callback, an EACCES error is returned.) A blocking
recvFrom in the context of the UI Process is not recommended as it will disable the User Interface for the duration of the blocking call.
The recvFrom operation returns the length of the received data. For a datagram socket, if data is too long to fit in the supplied buffer, excess bytes may be truncated depending on the type of socket, and an error code is returned.
The recvFrom: aBuffer length: length startingAt: index flags: flags from: aSocketAddress operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, ENOTCONN, EINPROGRESS, EOPNOTSUPP, ESHUTDOWN, ENOTSOCK, EWOULDBLOCK, EMSGSIZE, EINVAL, ECONNABORTED, ECONNRESET, EINTR, EBADF, EACCES. For detailed information on these errors, see
Error values.
Specify the length of the data with the length parameter. If the receiver is a datagram socket and the data is too long to pass through the underlying protocol, the system returns an error and does not transmit the data. If the receiver is a stream socket, the receiver answers the number of transmitted bytes.
If possible, a send on a blocking socket will block the current Smalltalk process. (i.e., If the current process is in a callback, an EACCES error is returned.) A blocking
send in the context of the UI Process is not recommended as it will disable the User Interface for the duration of the blocking call.
The send: aBuffer length: length startingAt: index flags: flags operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, ENETRESET, ENOTCONN, ENOBUFS, EINPROGRESS, EOPNOTSUPP, ESHUTDOWN, EBADF, ENOTSOCK, EWOULDBLOCK, EMSGSIZE, EINVAL, ECONNABORTED, ECONNRESET, EINTR, EACCES. For detailed information on these errors, see
Error values.
This operation sends length bytes of data from
aBuffer starting at
index. If multiple sends are required the message will be broken into message segments and sent. The
sendAll: operation will block at the current Smalltalk process level until the operation is completed or returns with an error code. A
sendAll: in the context of the UI Process is not recommended as it will disable the User Interface for the duration of the blocking call.
The sendAll: aBuffer length: length startingAt: index flags: flags operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, ENETRESET, ENOTCONN, ENOBUFS, EINPROGRESS, EOPNOTSUPP, ESHUTDOWN, EBADF, ENOTSOCK, EWOULDBLOCK, EINVAL, ECONNABORTED, ECONNRESET, EINTR, EACCES. For detailed information on these errors, see
Error values.
The sendTo operation allows an application program to send messages through an unconnected socket by specifying a destination
aSocketAddress. For stream sockets the
aSocketAddress parameter is ignored.
Specify the length of the data with the length parameter. If the receiver is a datagram socket and the data is too long to pass through the underlying protocol, the system returns an error and does not transmit the data. If the receiver is a stream socket, the receiver answers the number of transmitted bytes.
If possible, a sendTo on a blocking socket will block the current Smalltalk process. (If the current process is in a callback, an EACCES error is returned.) A blocking
sendTo in the context of the UI Process is not recommended as it will disable the User Interface for the duration of the blocking call.
Length of the data to be sent in bytes. Thelength must not exceed the size of
aBuffer plus the
index - 1. If the data is too long to pass through the underlying protocol, the error EMSGSIZE is returned and the data is not transmitted.
The sendTo: aBuffer length: length startingAt: index flags: flags to: aSocketAddress operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, ENETRESET, ENOTCONN, ENOBUFS, EINPROGRESS, EOPNOTSUPP, EAFNOSUPPORT, ESHUTDOWN, EBADF, ENOTSOCK, EWOULDBLOCK, EMSGSIZE, EINVAL, ECONNABORTED, ECONNRESET, EINTR, EADDRNOTAVAIL, EDESTADDREQ, ENETUNREACH, EACCES. For detailed information on these errors, see
Error values.
The shutDown: mode operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EINVAL, EINPROGRESS, ENOTCONN, EBADF, ENOTSOCK. For detailed information on these errors, see
Error values.
See getSockOpt: for the options that are typically supported by the underlying TCP/IP stack.
See getSockOpt: for the values which the options take.
Copyright 2005, 2020 Instantiations, Inc. All rights reserved.