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
3
votes
2 answers

Python TCPServer Address Reuse

import SocketServer import sys from Queue import * import threading class CustomTCPServer(SocketServer.TCPServer): def __init__(self, server_address, RequestHandlerClass, commandQueue=Queue): self.queue = commandQueue …
user2922343
  • 31
  • 1
  • 2
3
votes
1 answer

Indy, IdTCPSever sending data in utf=8 charset

I have problem with conversion strings to utf-8. I use standard Indy method for sending with conversion inside: AContext.Connection.IOHandler.writeln(Utf8Encode('ĄĘÓ')); but the client reads them like '???' - 3f 3f 3f in hex (I checked it by…
Artik
  • 803
  • 14
  • 36
3
votes
3 answers

Connect iPhone and Android devices (same LAN)

I would like to exchange information between two or more devices (Android and/or iOS). All the devices will be connected by WIFI to the same Router. Is it possible to make direct (client/server) TCP/IP connection in iPhone and Android? And how can…
Majid Laissi
  • 19,188
  • 19
  • 68
  • 105
3
votes
1 answer

What is the difference between TCPServer.new(port) and TCPServer.open("X.X.X.X", port) in Ruby?

I've read the Ruby documentation but I didn't really get what the difference is between these two objects. TCPServer.new(port) and TCPServer.open("X.X.X.X", port) All I know is that .new only responds to clients (and only those on the same computer)…
cyclingLinguist
  • 334
  • 1
  • 5
  • 16
3
votes
1 answer

Java TCP Server send more messages in one flush

using this code: Java Server side: ... out = new PrintWriter(this.client.getOutputStream(), true); ... public void sendMsg(String msg) { out.println(msg); //out.flush(); // we don't flush manually because there is auto flush true } C#…
Emrah Mehmedov
  • 1,492
  • 13
  • 28
3
votes
1 answer

socket.error: [Errno 111] Connection refused

I am trying to get a prototype ready and am having trouble getting a connection. I'm using OpenSSL for both the client and the server. #!/usr/bin/env python import SocketServer import json from OpenSSL import SSL import os import…
Lunchbox
  • 2,136
  • 7
  • 29
  • 40
3
votes
2 answers

Correct way to detect a client has disconnected from TCP/IP

I have used a Asynchronous TCP/IP server, everything works fine but when a client disconnects due to error or forced exit of the application it also closes my server due to an exception of type IO.IOException. The exception occurs in the following…
Tyson
  • 149
  • 3
  • 14
3
votes
1 answer

Twisted: number of client connections to TCP server limited?

I'm writing a chat server and encountered the following problem while unit testing it. In one of my unit tests, I connect many test clients to my server. As the number of connected users get to 511 the server stops responding without any error…
Zoli
  • 101
  • 2
  • 6
2
votes
2 answers

Multi Threaded Server design

I am trying to implement a TCP server which is a part of a larger project. Basically the server should be able to maintain a TCP connection with any number of clients (a minimum of 32) and service any client that requests servicing. In our scenario…
Abdullah
  • 521
  • 2
  • 8
  • 20
2
votes
1 answer

How to Check if Server has received data correctly

My TCPStream code is like this: use std::error::Error; use tokio::io::AsyncWriteExt; use tokio::net::TcpStream; #[tokio::main] pub async fn match_tcp_client(address: String, self_ip: String) -> Result<(), Box> { // Connect to a peer …
Zubayr
  • 457
  • 4
  • 18
2
votes
1 answer

Ruby TCP Socket does not read the entire input data

I've implemented a simple tcp server listening on a specific address and port: TCPServer.open(address,port) do |server| file = File.open(file_name,"wb") while client = server.accept while buffer = client.gets() puts…
XvaneD
  • 46
  • 5
2
votes
1 answer

TCP socket in Python getting Hung Up after Several hours of Running continuously

I have a python script that acts as a server that is getting hung up somewhere. After about 24 hours of running, the server seems to stop listening and responding entirely. I don't understand what is causing it because it behaves perfectly normal…
user18215985
2
votes
0 answers

What is the best way to reverse port forward information from a Kubernetes cluster to localhost?

I am attempting to reverse port forward information from a Kubernetes pod 192.168.49.2:30085 to my locoalhost:8000 but I am having issues. The goal is to get the same response as curl 192.168.49.2:30085 on localhost:8000 One thing I have tried has…
garrett_17
  • 51
  • 5
2
votes
1 answer

Python connect to Oracle database with TCPS

trying to connect Oracle database with TCPS connection from python but its failing with ORA-28759: failure to open file. I am not sure what I need to be configured in wallet when connecting from local/other server to database on different server. …
Panda
  • 97
  • 1
  • 9
2
votes
1 answer

.NET TCP Server Dropping Connections

A while back I wrote a little application to implement a TCP Server, but as a newbie to C# .NET I just followed a tutorial. The authorization part of it works fine, but due to following the tutorial to closely, after the authorization is made, it…
user470760