Questions tagged [tcpserver]

A tcp server uses raw tcp sockets to communicate with its client (usually without using a higher level protocol such as HTTP or IMAP).

A TCP server is a server that uses raw tcp sockets for the connection. All HTTP Servers are tcp servers in the end but usually you don't call them tcp servers because they work on a higher level protocol: HTTP.

680 questions
2
votes
1 answer

Socket server receiving data at buffer size

I send packets of different sizes one after the other, how can I receive the packets separately at the size I send, not cumulated in the buffer. It seems that now the server adds to the buffer until it fills it and then I can process…
Cristian
  • 23
  • 3
2
votes
0 answers

What is maximum number of TCP connections allowed when there are many TCP sockets?

I have a beefy server where I am listening to 24K unique tcp sockets on a single process. I have increased the FDs on system and all required(somaxconn, backlog and so on ) parameters to increase the number of TCP connections that can be accepted.…
2
votes
1 answer

How do I cancel a TCPListener that is in a listening loop from outside the loop?

I have a TCP server listening on requests in an infinite loop: use std::io::prelude::*; use std::net::TcpStream; use std::net::TcpListener; fn main() { let listener = TcpListener::bind("0.0.0.0:7878").unwrap(); for stream in…
Nicolas Marshall
  • 4,186
  • 9
  • 36
  • 54
2
votes
1 answer

Ruby tcpserver client server

I have an application that I am coding to have the logging info be sent over tcpsocket to a server and have a monitor client connect to the server to view the logging data . So far i am able to get to the stage where the info is sent to the server…
veccy
  • 925
  • 3
  • 12
  • 20
2
votes
3 answers

Is there any c++ tcp server on linux?

I want to develop one no-blocking tcp server with c++, is there any open source project like Twisted ?
why
  • 23,923
  • 29
  • 97
  • 142
2
votes
1 answer

Vertx NetServer control read flow

I am trying to mimic a TCP server for tests with Vertx based on existing infrastructure that I have to work with. The server I am mimicking works completely async and knows the length of the incoming buffer based on a pre-header in the buffer that…
Tom
  • 3,711
  • 2
  • 25
  • 31
2
votes
1 answer

Asyncio server not flushing transport buffer

I am running an asyncio TCP server using the asyncio.Protocol class. When I am using the data variable in the data_received() function, I am getting all data that has ever been sent over the socket. Is there a way to flush the buffer every time I…
EleoFalcon
  • 25
  • 3
2
votes
1 answer

CocoaAsyncSocket in swift3 to create tcp server/Client?

I am newly to networks in iOS, I want to create tcp server/Client and I try many libraraies such as SwiftSocket, CocoaAsyncSocket, BlueSocket but I fail to reach my target, any one can provide me any example in swift to achieve my goal?
Ali A. Jalil
  • 873
  • 11
  • 25
2
votes
0 answers

Creating a TCP Server in the Kernel in C

I'm trying to write a simple TCP server in a kernel module. The code compiles and runs fine except for when a client connects to the server. Once a client connects, it triggers a kernel warning in inet_accept. I was wondering if there was anything…
Chirality
  • 745
  • 8
  • 22
2
votes
1 answer

IdleTimeout in tcp server

I am working on a project in the Go language which includes TCP server. I am trying to implement an idle timeout on server sockets, but couldn't do it. The Go code I am using goes like this: package main import ( "bufio" "fmt" "net" …
Prakhar Mishra
  • 1,586
  • 4
  • 28
  • 52
2
votes
1 answer

Segmentation fault - sending object over server to client

I am trying to create a client server application in linux. Server sends object to client but client write Segmentation fault. Here is the code. Snake is class where is two-dimensional array. Client send message "p" and server is creating object…
Sedrik105
  • 21
  • 1
2
votes
0 answers

Sending message from Server to Client when there is much client connections

I am developing a Server that should handle many requests, I`m using Delphi and Indy Library. Each request/connection has it's own thread, I want to send message from Server to Client, I have a Thread-List that holds Client Contexts and keep…
Mahmoud_Mehri
  • 1,643
  • 2
  • 20
  • 38
2
votes
2 answers

Multithreaded socket TCP server

I am trying to implement a simple multithreaded TCP server. It works well when there is only one connected client, but when there are two clients connected at the same time, the thread for the 1st client sometimes receives a message that has to be…
2
votes
1 answer

Unit testing Client/Server App in C++

I am currently developing Client/Server app based on TCP protocol in C/C++ and want to perform unit tests of both client and server side. I am using unix sockets for development. Are there any MOCK libs or something similar to be used in testing or…
2
votes
0 answers

Fuzz TCP client with Peach Fuzzer

I want to fuzz a TCP clinet with Peach Fuzzer. I found some examples for fuzzing TCP server. But I can't any example for fuzzing TCP client. Who can show me some examples for fuzzing TCP client or get me some ideas?
H.Skr
  • 21
  • 1