The System.Net.Sockets module provides client and server-side synchronous network socket connections.
A client-side socket has support for HTTPS connections implemented by means of the GnuTLS library. HTTPS support should be considered experimental.
There are limitations with the server-side sockets: they do not support HTTPS connections and they do not scale to thousands of connections or more because lack of asynchrony. The programming model is thread per client.
This socketClient1 example creates a TcpSocket , sends a HTTP/1.1 request using the socket, reads the reply into a string using an IOBuffer and prints the reply to console.
This socketClient2 example creates a TcpClient , gets a NetworkByteStream from it, sends a HTTP/1.1 request to the stream, reads the reply from the stream into a string and prints the reply to console.
System | ||
Net | ||
Sockets |
System.Net.Sockets/NetworkByteStream.cm |
System.Net.Sockets/TcpClient.cm |
System.Net.Sockets/TcpListener.cm |
System.Net.Sockets/TcpSocket.cm |