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

Simple One Thread Socket - TCP Server

First, I don't know if Stackoverflow is the best site to post this kind of message, but I don't know another sites like this. In oder to understand properly tcp programmation in C#, I decided to do all possible ways from scratch. Here is what I…
BaptX
  • 561
  • 1
  • 7
  • 21
2
votes
0 answers

TCP Server on IPhone

I am trying to implement a sort of chat between multiple IPhones, where one IPhone serves as a server and the rest connect to it. I have a main server which the rest of the phones get data on the connection, but I am not sure what data to send. I…
gilmishal
  • 1,884
  • 1
  • 22
  • 37
2
votes
2 answers

Indy TCPServer OnExecute analog of HTTPServer OnCommandGet

Is it possible to make my TCPServer.OnExecute event behave the same way as HTTPServer.OnCommandGet behaves : procedure TMainForm.HttpServerCommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo:…
Viktor Anastasov
  • 1,093
  • 3
  • 17
  • 33
2
votes
0 answers

Node JS accepting null bytes

Hello I am writing a simple TCP/IP project for my UNI assignment and I just bumped into a problem with reading data from sockets like this: socket.on('data', function(data) { g_socket += data.toString('utf8'); ... What happens if client…
tyrhus
  • 181
  • 1
  • 9
2
votes
1 answer

Delphi XE2 / Indy TIdTCPServer / "Connection reset by peer"

I'm with one problem using Indy in Delphi XE2 to send TCP Messages using TIdTCPServer. For exemple: I have 2 devices and i'll go communicate with device 1. When i send messages to device 1, the messages were send fine. But without close the program,…
pedro.olimpio
  • 1,478
  • 2
  • 22
  • 43
2
votes
2 answers

I can't stop java SwingWorker process

I was running a tcp server in java which is done using SwingWorker class. First time it will start successful but when i stop and start the process it won't work. i couldn't find what is the bug please help me to fix this import…
Hybrid Developer
  • 2,320
  • 1
  • 34
  • 55
2
votes
0 answers

Multiple Client Connections Management with ExecutorService

I am trying to create a TCP Server in Java, However I am using the ExecutorService to service client connection requests in a class called ServerService. Like this: public class ServerService extends Thread { final Settings settings =…
I.Tyger
  • 715
  • 1
  • 8
  • 19
2
votes
0 answers

Make a TCPServer recieve a multi-line message in Ruby?

I have a machine that sends a multi-line message to a TCP/IP Server. However, when I use any simple Ruby Server, I can only receive the first and last lines (as separate messages in separate connections). I've tried using TCPServer, EventMachine and…
2
votes
1 answer

Receive buffer data is missing after first read in TcpServer

I try to send data shorter than 255 length in Client side. I try to send data with this protocol : Lenghth+String Byte+string sample : string = ABCD sentdata = 4ABCD here is my server side code: procedure TfrmServer.tcpsrvr1Accept(Sender: TObject; …
A1Gard
  • 4,070
  • 4
  • 31
  • 55
2
votes
3 answers

why does my program skip the if statement

I have this tcp/ip program, where if the user enter's "Bye." it would stop the connection, and end the program. However, when I type Bye. from the client side, it won't do the if statement, but rather the other. part of the program while ((inputLine…
user2577345
2
votes
0 answers

Java technique which allow switch client to correct work servers

I am Java developer, and I never worked with server applications. Now I plan to write some distributed server with workflow like this: Client(desktop application) logins to core(auth) server. Core server chooses one of the work servers. And…
Seagull
  • 13,484
  • 2
  • 33
  • 45
2
votes
2 answers

TCP server in C# causing 100% CPU usage after 2-3 days

Here's my code for a very simple TCP Server (basically the sample Asynchronous Server Socket example - http://goo.gl/Ix5C - modified slightly): public static void InitiateListener() { try { allDone = new…
Sundance
  • 127
  • 1
  • 8
2
votes
0 answers

TCP server - Range requests not getting sustained (HLS loopback server)

I understand that Byte-Range support is expected of any HLS (HTTP Live Streaming) server. We are serving media files in our iOS app through a localhost/loopback server using sockets in C, fgets to read data and fprintf to write back. (Requirement of…
Dev Kanchen
  • 2,332
  • 3
  • 28
  • 40
2
votes
0 answers

TCPListener does not accept clients

I'm running a TCP server in c#. The program seems to run and hold for new clients (it stop on TcpClient client = this.tcpListener.AcceptTcpClient();) waiting for new connections. However if I check the network (using the netstat command) the server…
nabrugir
  • 1,839
  • 2
  • 22
  • 38
2
votes
3 answers

tcp client to communicate with server present in different network (NAT issue)

I have a TCP client program and which needs to communicate with servers embedded in devices. There can be 1000's of devices which need to be controlled through the single client program. Since the number of these devices (i.e. tcp servers) is…
Rohit
  • 6,941
  • 17
  • 58
  • 102