Transmission Control Protocol (TCP) is a transport layer protocol that provides a connection-oriented data stream service with guaranteed, in-order delivery.
2
votes
0answers
12 views
Node.JS TCP Server Noob here
I just got in to Node.JS and am loving it but I am wondering if I am learning it the right way or using it right cause I don't want to learn it the wrong way then I'll have to relearn it so am ...
2
votes
1answer
48 views
PHP TCP socket server
I created a PHP script which will be running 24/7 as a TCP socket server and will send data from the DB back to clients. The code is working, and so far, I see no problems.
However, I can only test ...
1
vote
1answer
32 views
TCP client library using Winsock WSAEventSelect in C++ - Take 2
This is my second take on creating a tcp client C++ class. The class declaration is general but the implementation is Windows only at this stage and uses the Microsoft Winsock WSAEventSelect model.
...
3
votes
1answer
42 views
TCP server implementation in .NET
I wrote a couple programs in the past that use VB6's Winsock to achieve TCP communications, but still I'm kinda new to socket programming in .NET.
I needed the same functionality of the Winsock to ...
6
votes
1answer
101 views
TCP authentication server and client
This is the first time I'm dealing with C# as I'm accustomed to Java sockets, so I do want your full review and anything you think I can accomplish better or optimize in the code will be very ...
3
votes
1answer
41 views
A socket server that receives strings and prints them
Summary: Is my server handling every error and corner case possible? If not, what did I miss?
Details
I'm trying to write the most basic socket server I can, so I can learn TCP and the pitfalls of ...
4
votes
0answers
144 views
Socket application using TPL
This is an application I wrote that allows multiple TCP clients to share a single TCP connection to a remote server (hosted project, and a demo). Traffic generated by the server is forwarded to all ...
5
votes
1answer
65 views
Server connection handler in Python
I am working on a server for a smart house. This part of code is responsible for communication with client (separate application), sending requested data and ensuring everything is safe.
I've decided ...
4
votes
2answers
140 views
Python 3 NetScanner Daemon
I’m pretty new to programming and python in particular. This is a simple ICMP/TCP scanner that dumps output to a terminal and/or csv file. My goal was to make a daemon that could do simple scanning ...
0
votes
1answer
76 views
Modbus connection over TCP and Serial port
I want to improve my code. In this code I don't like my contructor, but without it I keep getting an error while trying to connect NullPointerException.Any ...
3
votes
2answers
47 views
TCP client and server supporting six simple commands
For a class, I was given an assignment to code a simple TCP connection between a server and a client. Once the TCP handshake is done, the client sends inquiries to the server. It's a 2 second ...
4
votes
1answer
68 views
Common client server implementation
I have created a common C file for a basic client server. It works fine on my Linux setup. Please provide your comments/suggestions on how the code can be optimized/enhanced.
After compiling we need ...
4
votes
1answer
63 views
Java NIO server Selector loop
I have a server that uses Java NIO in non-blocking mode. Right now I'm using a single thread for the selector, and four worker threads to process the bytes after ...
3
votes
2answers
157 views
MultiThreaded TCP Server with high CPU usage
I wrote simple C# TCP Server application and my program use a lot of cup, i was wondering anyone can review my code and would be grateful for any hints and suggestion.
This is my code.
...
1
vote
0answers
164 views
3
votes
0answers
54 views
Basic Server/Client Model built around ASIO
For this project, I'm using the non-Boost version of the ASIO library.
The basic idea is that it is a relatively simple stand-alone class capable of functioning either as a server or client depending ...
0
votes
0answers
46 views
Adds digital signature to outgoing TCP packet
The code connects multiple clients to a server using TCP sockets asynchronously. I have added code to attach a digital signature to the outgoing messages from the server, to authenticate the message ...
3
votes
1answer
81 views
TCP connection pool
I am looking for any feedback on my connection pool implementation (I removed the documentation so this post isn't so bloated). The pool times-out idle connections after a certain timeout interval ...
2
votes
1answer
183 views
Reading and Writing Messages from a Socket
This is code from my android client which communicates over wifi to a small server program (not coded in java). This is my first time playing around with sockets, so I'm sure there are lots of little ...
2
votes
1answer
88 views
Probe for open application on a TCP port
I need to examine an application port to see if it opens and I need to put the retry count as a parameter. Since I'm new to Node I wanted to get your feedback on it
for improvements.
...
2
votes
2answers
199 views
Simple TCP client-server solution
I have implemented a simple client-server solution using Java sockets and useful classes from java.util.concurrent.
The communication protocol is rather simple:
...
5
votes
2answers
416 views
Design watchdog, reconnecting to server
I have console application that sends and process XML data. I have created a fault mechanism that the connection drops. I go in a "fault" mode. And try to reconnect to my server. I'm sending ...
2
votes
2answers
101 views
Xml messages processing networkstream [closed]
I'm currently processing xml messages with C#. It is working But I'm not confident that my code is fast enough. There are 3 possible messages I can receive. When I receive one the message an event is ...
1
vote
1answer
187 views
ISO8583 encoding data fields
I just want to confirm that my ISO8583 format is correct.
Example:
For the data field 35, the length of the data is 36, so I put 36 before the 4842. Then all the data is inserted in a string (...
3
votes
1answer
543 views
Simple TCP client in Rust
Here's a little command-line utility written in Rust that connects to a Denon AV receiver and sends a command, then receives the response. It's a simple TCP client that takes its command from the ...
1
vote
1answer
353 views
Python TCP echo server
The below code is a simple TCP echo server. The folks using it claim "it is going down every now and again". Any thoughts on how this could be improved would be really appreciated, particularly if ...
5
votes
2answers
97 views
Scanning for open ports
I made what started out as a web browser but now is a scanner for open ports. I wanted to know if you think this is a realistic or a unreliable tool for port testing. I found some open ports on my ...
4
votes
2answers
188 views
Asynchronously accepting multiple client connections without impacting main thread
I am implementing a multi-player game in C# and having seen all sorts of projects, from indie developers all the way to large studios struggle to patch networking into existing products in the past, ...
14
votes
1answer
473 views
TCP Socket Wrapper
I'm trying to build a simple server software for training purpose, most likely a IRC server, but I'm not there yet.
I'm currently implementing a TCP socket class, to ease the use of the C socket API. ...
17
votes
3answers
1k views
Simple webserver in C
My first learning project in C. Looking for general feedback e.g. gotchas, coding standards, formatting, naming etc. I'm here to learn!
webserver.h
...
7
votes
2answers
340 views
TCP Tunnel in C
I'm completely aware that I'm not using NIO, but this is my first polished C project. All criticism is welcome, if I'm doing something wrong, I want to nip it in the bud before I'm used to it.
<...
0
votes
0answers
83 views
Thread function for server-client connection
edit: This section has not thrown segmentation faults so lets focus on it please.
I am working on multithreading a data server application. I am new to multithreading in general. I wrote a version a ...
1
vote
2answers
135 views
Open server asking for a password
It first creates a server and waits to connect. Once the client connects to the server he gets the line. If he puts the correct code he gets output -> good job. If not -> the software disconnects.
My ...
11
votes
2answers
120 views
Raw Text TCP Client v3
After studying and considering the reviews for this code, I began working on the code, and came up with this. It has much better error and disconnect detection, and it also resolves addresses:
...
14
votes
5answers
839 views
Raw Text TCP Client
Yesterday I posted a request for a code review. After reviewing the code and the reviews, and after some sleep, I decided I can do better. In fact I logged on with the intent of deleting the question ...
7
votes
1answer
212 views
Python Socket Receiver
I put this together and am having some doubts to the number of connections I can make. I also doubt if I can brute force the server to serve up connections and then hang.
Please take a look and tell ...
4
votes
3answers
97 views
Fetching filesystem directory listings on a server
I developed a server which takes a directory name then lists files in it and sends this list to a client. And I want that server to work with Telnet.
It works but I have some questions on how I can ...
6
votes
2answers
455 views
Java NIO Server Scaling
I wrote a Java NIO Echo Server and want to maximize the number of connections to the server.
The problem is that when I try to connect more than 10k clients the clients get their connections refused:
...
1
vote
1answer
259 views
High-volume object-passing from client to server
I have 1 client and 1 server. Client passes Java objects (throughput 10000/sec). I am using Netty. I am short on CPU and this code consumes a lot.
I have to make Server1 (Netty Client) talk to ...
7
votes
2answers
930 views
TCP socket retry mechanism
I am writing a C++ client application which will send some data to server and wait for its response. Now the protocol is to wait for a specific timeout and then retry for specific times. If all goes ...
7
votes
1answer
587 views
Simple C Port Scanner
I have been writing a Simple Port scanner in C, once I got it to work I decided I wanted to make it faster because it takes a very long time for it to get done with scanning all of the ports.Is there ...
3
votes
1answer
2k views
Efficient Ring Buffer (FIFO)
I need to implement a Ring Buffer/FIFO for data coming from a TCP socket.
It must support the following operations:
Append a the recv()'ed chunk of bytes.
Allow me to peek at the beginning of the ...
7
votes
3answers
5k views
AsyncTcpClient (Asynchronous TcpClient)
I've been doing network programming using C#'s TcpClient for several years. The code below is an asynchronous wrapper for ...
0
votes
1answer
769 views
Network Send and Reply
I have developed a TCP listener to receive messages from a client machine, take that string and put it in a db, then send back a response with some data relating to that string. First attempt at a tcp ...
3
votes
1answer
128 views
Custom TcpListener
I have only been coding C# for a short time and I can't say I'm an expert but I am rather enjoying it. I wondered if you could see any way I could improve my code.
...
7
votes
1answer
1k views
TCP Server using NIO to save data from IoT clients
I've built a small single threaded TCP server using NIO.
This server is used by small client devices to report things like temperature, when the device has been switched on, when it switches off, and ...
5
votes
2answers
4k views
TCP chat application with both server and client logic in same application
Here is my simple chat program. I'm wondering whether it has an acceptable design (both object oriented design and network design).
If you want to run it, I can provide the solution folder.
...
5
votes
1answer
2k views
TCP Client-Server communications
I have developed this simple TCP Server/Client communication program, and am looking for ways of lowering the code footprint where possible.Side note, Both Classes are Main as they run independently, ...
4
votes
1answer
7k views
Creating a TCP Listener and receiving data
I am very new to network programming and I'm thinking I have probably misconstrued the creation of an appropriate TCP listener. The code I have below works perfectly, but I have a feeling it's a "hack ...
7
votes
3answers
3k views
TCP Chat (Server/Client)
I'm looking for some hints or advice regarding efficiency, performance and some good coding practices. Also I'm curious about synchronization. The server is multithreaded, so I think some operations ...