What data type is 'data' in Node.js TCP sockets? How to split a byte stream into separate messages?
In the provided Node.js TCP server snippet, the socket.on('data', ...) callback receives a Buffer object. This data represents raw binary data sent from the client over the TCP connection. TCP is a stream-oriented protocol; there is no inherent message boundary. To extract discrete messages from this continuous byte stream, you must implement a ...
Posted on Sat, 09 May 2026 06:54:08 +0000 by SnakeFox
Building TCP and HTTP Clients and Servers with Vert.x
Vert.x provides a straightforward way to implement non-blocking TCP and HTTP clients and servers.
TCP Server Implementation
Basic Server Creation
Instantiate a TCP server with default settings:
NetServer tcpServer = vertx.createNetServer();
Server Configuration
Customize server behavior by passing a NetServerOptions object:
NetServerOptions sr ...
Posted on Fri, 08 May 2026 03:09:39 +0000 by jraede
Basic TCP Socket Communication in Python with Multi-Client Support
Simple TCP Server and Client
A minimal TCP server that listens for a single client connection:
import socket
def run_server():
host = '0.0.0.0'
port = 5001
server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_sock.bind((host, port))
server_sock.listen(1)
print("Listening...")
while True: ...
Posted on Thu, 07 May 2026 17:47:13 +0000 by jtymes
Implementing Basic Socket Communication in Android
Socket communication enables networked processes to exchange data using a standardized interface. In a network environment, each process is identified by a unique combination of IP address, protocol, and port number, which allows for reliable inter-process communication.
The underlying mechanism of socket programming originates from Unix system ...
Posted on Thu, 07 May 2026 10:01:02 +0000 by prosolutions