Questions tagged [tcpsocket]
246 questions
0
votes
2 answers
How to maintain the TCP connection using Ruby?
Using TCPSocket, I need to socket.puts "foobar", and then socket.close to let the socket in the other side socket.read the message.
Is there a way to send or receive a message though a socket, but without closing the socket, which mean I can send…

mko
- 21,334
- 49
- 130
- 191
0
votes
1 answer
Sending image Through TCP Socket in Java
I'm trying to make a Client Server Application which the server list name of available images and the client select one of them to download Such as here :
Thread in Server
public void run()
{
try {
in = new…

Alyafey
- 1,455
- 3
- 15
- 23
0
votes
1 answer
Connect to a Rails Server via Ruby using the TCPSocket. Getting "Length Required WEBrick::HTTPStatus::LengthRequired"
I am trying to connect to a Rails server but the response i keep getting is
Length Required WEBrick::HTTPStatus::LengthRequired
I am using TCPSocket to connect to the server.
require 'socket'
host = 'localhost'
port =…

ssyade gayle
- 3
- 2
0
votes
1 answer
ruby socket issue
i'm still kind of newbie to ruby, but i became used on using ruby sockets, cause i used the 'Socket' class many times, and so i having full control to my sockets and their options.
the thing is i'm trying to make it a little easy for me, so i'm…

Raafat
- 173
- 3
- 9
0
votes
1 answer
TCP Socket Programming in iOS. Server Client Response
I'm almost done with this task but i'm stuck a point due to which i'm getting partial result.
I have server(linux or windows) and client(iOS) between which TCP IP socket connection exist. I have used form load in my iphone simulator where the…

iPhany
- 13
- 1
- 4
0
votes
0 answers
Sending File and at the Same Time Sending Strings using TCP Socket
I have a file sharing application with logging capabilities. Every time a user connects, the client sends a string telling that a user is connected, same also when a client disconnects a string, telling that the user was disconnected is sent on the…

Ryklon Zen
- 173
- 1
- 3
- 19
0
votes
1 answer
Ruby TCPSocket keeps losing connection
I have a client and server. I start up the server, and run the client, and the first time it works fine. The second time I run the client(without restarting the server), the client appears to hang. Can anyone see what is wrong?
I have a…

Superpolock
- 3,515
- 7
- 30
- 24
0
votes
2 answers
How to save an input stream into a variable when you don t know it 's type?
I am using TCP Sockets and I am a beginner in Java and Sockets too. The scenario is that the client,depending on server 's answer, may send either int or a string. I need to save the output stream of the client, in a variable on the server 's side,…

ElaGorilaki
- 227
- 6
- 20
0
votes
3 answers
Can you specify a tcp socket connection to use a proxy?
Apologies for the brevity of this question... I'm sure it's a simple yes/no type scenario only I can't nail that yes/no down..
Can you programatically specify a proxy for a tcp socket connection? Or does it use the system proxy?

Dave Lawrence
- 3,843
- 2
- 21
- 35
0
votes
1 answer
TCP connection sends data only one way does not receive
I have fought enough with this: I am trying to write a TCP client code and this code has to send a data to a server and and get a response. The client code is as follows:

user1051505
- 952
- 3
- 22
- 37
0
votes
3 answers
how to receive the large data using recv()?
i developed client server program using c++,so i want to receive more than 500kb , my client message is terminated with "!" ,so i want to receive until my last byte(!) receive ,
this is my code it doesn't work.what is wrong with it.
do
{
int…

Mr.Cool
- 1,525
- 10
- 32
- 51
-1
votes
2 answers
How can i use arrow function in Tcpsocket?
handleCreate = (data) => {
const { wifi } = this.state;
this.setState({
wifi: wifi.concat({ id: this.id++, ...data })
})
}
componentDidMount(){
this.handleCreate();
}
render(){
const client =…

Simon
- 9
- 1
-1
votes
1 answer
Send QImage from c++ client to python server
The c++ client has QImage which must be sent via a tcp socket to the python server and saved in jpeg there. The server does not use qt. Could you explain how to do this correctly? How do I write data from QImage to the socket and how do I read it in…

RemQ
- 1
-1
votes
1 answer
Simple java TCP client
I have a tested server on ESP8266 with loopback and a tcp client app that doesn't send messages. I also tested it on a server that tells you if there is somebody connected and it says that it connects.
The "chat" textView shows the message when I…

Omnos
- 25
- 8
-1
votes
1 answer
How can i detect from client/server side if the other side lost his net connection?
I'm using Winsock2, and i made a TCP socket over IPv4.
I know how to detect if one side closed connection (checking the value of recv function), but what if a side loses its internet connection?
Anyone both the client and the server can't detect…

Serusar
- 57
- 6