Questions tagged [socketserver]

Python module which simplifies the task of writing network servers.

385 questions
0
votes
1 answer

Server Socket Re-connection Issue

I have the following code: public class StartSocket{ serverSocket = new ServerSocket(listenPort); while (listening) { new ServerThread(serverSocket.accept()).start(); } } The ServerThread is used to…
0
votes
2 answers

Having an issue with a server program example from Java: How to Program

I'm teaching myself Java and I'm using the Deitel book as it came highly recommended and I've hit a bit of a snafu. So I tried copying over the figure 27.5-8 in the book Java: How to Program. I figured I would need the .5 figure as it's the server…
Rob
  • 9
  • 1
0
votes
1 answer

Implementation of clients communication (android)

Say Client A want to create a SocketServer but not in his phone, is in the outside Server. Then Client B can connect the SocketServer in the outside Server. Then A and B can communicate. My idea is: Outside Server has a thread keep running to listen…
0
votes
1 answer

Select API not waiting the specified timeout

I am doing a combination of Socket programming and pexpect in the same code. I have got it working but with a minor glitch. The select API waits for the specified 5 seconds in the first iteration. As soon as it received an input from the client it…
Vinay Pai
  • 443
  • 1
  • 5
  • 13
0
votes
2 answers

Multiple clients from same IP

If you have a service that uses a specific port, and you have multiple computers on the same ip addess, how is this handled? Should the service specify to which computer on the ip address the information should be send? What if both computers on the…
Ihmahr
  • 1,110
  • 1
  • 16
  • 25
0
votes
2 answers

Use local pc as a server

I just made a little chat programm with a server and a client in java. The client needs to connect to the server with the ip of the server. All my testing I did with the localhost (127.0.0.1) and everything went fine, but when I tested it later on…
Aaron Priesterroth
  • 307
  • 2
  • 4
  • 17
0
votes
1 answer

how to make a UDP python localhost go public

I have a python localhost set up on a raspberry pi to listen for UDP packets. But I'm wondering how I can make this a public server in order to send UDP packets from roaming devices. The below code works perfectly sending UDP packets from a device…
ecki
  • 780
  • 1
  • 7
  • 20
0
votes
1 answer

PHP SocketServer not acception more than 255 concurrent connections

I'm running a PHP (5.4.12) script on a Windows Server 2008 machine. When the total concurrent connections hit 255, the script crashes. On a PHP 5.2.x system the SocketServer end with an error: "An operation was attempted on something that is not a…
0
votes
1 answer

Android Service with socket programming

Hey I need to implement a infinite loop for receiving commands through socket and updating status in my android app and want that thread to be running even if application is closed. So I need to know that what I'm thinking is optimal solution or…
Adnan Ahmed
  • 844
  • 6
  • 19
0
votes
2 answers

getInputStream in Async Task

I have an Activity which calls an Async task to accept socket connections through a predefined InetAddress. The Async task calls another Async task to listen for messages in. but it hangs on the get input stream I have been racking my brain for…
Intern87
  • 469
  • 1
  • 6
  • 18
0
votes
1 answer

How to get a python SocketServer to received until string is terminated with NUL

In Python, how would I go about writing a TCP SocketServer receiving a string until a NUL character (\0) is found? After the string is received fully, I need the socket to continue to be able to receive new strings.
chyyran
  • 2,446
  • 2
  • 21
  • 35
0
votes
1 answer

c# file server client receiving file before server finishes sending

im having some trouble with a file server that i made in c#. The problem is that when i run both the server and the client in my computer, they work fine, but when i use the client on another computer, the client receives the file before the server…
user2038443
  • 163
  • 1
  • 11
0
votes
1 answer

Do independent mobile platforms(ios,android...) connect one transaction server?

I want to develop one transaction server which sends/receives texts to independent clients. I decide to use java language to develop transaction server and i have three clients which are android, Ios and Win8 to communicate with transaction server.…
dunker
  • 97
  • 9
0
votes
1 answer

How to send Images via SocketServer in Python 3?

I would like to send images with socketserver of python 3 and I have a problem of encoding. Do I need to send it in bytes or in text? And do I need to open my image with the 'b' option and to transform it in a particular format? With previous…
Loric
  • 1,678
  • 8
  • 28
  • 48
0
votes
1 answer

Library to format bytes of HTTP response

I need a library that can only format a correct HTTP response (without creating a web server because I already have this one). I have to pass a body of an http response and a content type to this library. The following function does not work…
sergzach
  • 6,578
  • 7
  • 46
  • 84