Transmission Control Protocol (TCP) is a transport layer protocol that provides a connection-oriented data stream service with guaranteed, in-order delivery.
0
votes
1answer
15 views
Executing a tcpstat command and performing operations on its output simultaneously
I am trying to run a tcpstat command that gives the output about number of icmp requests being received. and at the same time i need to check the count so that if it exceeds some threshold, a message ...
0
votes
0answers
8 views
Camel : stop the route when the jdbc connection loss is detected
I have an application with the following route:
from("netty:tcp://localhost:5150?sync=false&keepAlive=true").routeId("tcp.input")
.transform().simple("insert into tamponems (AVIS) values ...
3
votes
5answers
63 views
Is there a way to detect that TCP socket has been closed by the remote peer, without reading from it?
First, a little background to explain the motivation: I'm working on a very simple select()-based TCP "mirror proxy", that allows two firewalled clients to talk to each other indirectly. Both ...
0
votes
0answers
9 views
how to see httpS request & headers on win?
I'm working on developing some tests that will work with rest api.
I have restClient in Firefox and my eclipse where I run requests through HttpsURLConnection.
My problem is that sometimes when i ...
0
votes
0answers
10 views
TCP packet option with Pcap
I'm using Pcap to build network tcp packages:
private static Packet BuildTcpPacket()
{
EthernetLayer ethernetLayer =
new EthernetLayer
{
Source = new ...
0
votes
0answers
18 views
TcpClient.Client.Receive() stops getting messages for a few seconds
I have an application that receives a message, through a TCP connection, every second. It worked great for a long time, but lately im having issues with it.
My TCP client stopped getting messages for ...
0
votes
2answers
15 views
socket_connect(): unable to connect [10061] - target machine actively refused it
I am trying to connect the target written in C using PHP socket_connect() function, but I am getting the following error:
Warning: socket_connect(): unable to connect [10061]: No connection could be ...
0
votes
3answers
33 views
Java: is it possible for a client to use same port on remote computer twice?
Let me clarify the question.
See the digram
Is such connection possible with all the four sockets running simultaneously!
ServerSocket is the ServerSocket from java.net API
normal Socket is Socket ...
0
votes
1answer
21 views
how to correctly close SocketChannel java in JAVA?
I am developing multithreading non-blocking tcp server and client in Java. I have a problem with the server realizing that the client socket is closed. For him it's allways open. Here is the code and ...
0
votes
3answers
28 views
does poll system call know if remote socket closed or disconnected?
int rc = poll(fds, 1, -1);
let us say the remote peer goes down. socket breaks here.
In this case will the poll system call return -1 or
will return > 0 and report the disconnect as an error event on ...
0
votes
1answer
10 views
Android BluetoothPAN to create TCP/IP network between Android device and Windows7 PC
Question 1) I'm trying to create a TCP/IP connection between Android device and a Windows 7 PC. For this purpose, I'm using Android's hidden BlutoothPan class using Java reflection API. Here is the ...
0
votes
0answers
38 views
boost read_some funtion lost data
I'm implementing a tcp server with boost asio library.
In the server, I use asio::async_read_some to get data, and use asio::write to write data. The server code is something like that.
...
0
votes
0answers
11 views
HTTP/1/1 400 Bad Request in a keep alive connection using sockets
Hi I am getting this error from the server. This is a TCP socket connection to an external IP using a tunnel. From our source IP we send a request to the destination server IP, port. This is the ...
-1
votes
0answers
9 views
Can a server in TCP listen-state send a request to client? [on hold]
As the header says: "Can a server in TCP listen-state send a request to client?"
I'm building an application in Embedded board using HTTP protocol.
I try to put Board in to server listen state and ...
0
votes
1answer
27 views
how can i send Full name in TCP service in 2nd time?
When i send data through TCP server to client first time full name retrieved when i again send the another name like book it retrieved as (ook) in C sharp
client side code
sck = new ...
2
votes
2answers
26 views
Is it enough to just close the Socket or should I close the streams as well?
When I establish a connection with my server via TCP Socket I use the following code to communicate:
Socket socket = ...
NetworkStream ns = new NetworkStream(socket);
StreamReader sr = new ...
0
votes
0answers
22 views
TCP: switch to redundant machine, RST not sent immediately
consider the following scenario:
2 machines available - A and B (both running on Linux)
A is active.
B is not active.
host x is using TCP to talk with machine A.
everything works fine.
...
0
votes
1answer
34 views
What parameters do i have to send to a server?
I can't send a valid request to a Server.
I have this protocol description but I don't understand what thing i have to send with socat to the server.
header Must always be transmitted in full, ...
-1
votes
0answers
11 views
capture remote desktop traffic
How do I capture my remote desktop tcp requests.
I am running a client application using RDP. This client application connects to an external server using TCP sockets. So the client(C) runs on a ...
0
votes
2answers
46 views
How to handle socket read in C when the remote server closes socket possibly before read is finished?
Client blocks on the read call waiting to read n bytes.
Server writes n bytes and closes the connection immediately.
Can read call return negative or zero in this case if the socket gets closed ...
0
votes
1answer
7 views
Why STRACE shows EAGAIN (Resource temporarily unavailable)
Following is the sequence I am getting
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7
setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(7, SOL_SOCKET, SO_SNDBUF, [32120], 4) = 0
...
0
votes
0answers
12 views
Creating TCP connection from server to android device
I'm trying to create tcp connection between server and android device.
I managed to create it when the server (my computer) and the android device were connected to the same router (same local ...
-2
votes
0answers
9 views
HTTP Header, TCP client
My client uses a TCP socket connection to connect to their Server .Our software opens a socket from our client platform to connect their server platform.
This is the way a request will look like
...
0
votes
1answer
18 views
Restarting a service on Network Change Android
I know it's not possible to keep the same socket across network changes, but what is the easiest way to restart a service after a network change? I assume the best practice is to listen for a ...
1
vote
2answers
45 views
send() and sendto() blocking in a file transfer program
it seems that when i use send() function (in a TCP file transfer program) like this
while((count = recv(socketConnection, buff, 100000, 0))>0)
myfile.write(buff,count);
the function recv() just ...
0
votes
1answer
10 views
android tcp connection - measure delay / do benchmark
do you guys know a possibility to measure the latency of my tcp application?
My app is implemented as client and sends data to a java server. I wanna know long it takes from the moment i call the ...
0
votes
1answer
27 views
How destroy SelectionKey attachment? attach(null) doesn't work
My java application has memory leaks - when my resources clearing code is executing task manager shows that memory usage wasn't changed. My code
while (isRunning) {
try
{
...
0
votes
0answers
37 views
I wonder how can I parse Emails
I using winppcap in regular C
to sniff some packets.
could you please help me ,
where can I get the mailform - mailto and subject ?
some RFC or much better example packet please , I googled for ...
0
votes
2answers
38 views
Implementing a non-blocking TCP Server in Python 2.5.1
I am trying to implement a TCP server which will not hang (potentially) forever during a recv or sendall operation. Here is the code that I have so far:
from socket import *
import thread
import ...
0
votes
1answer
31 views
Connecting to a remote machine through client-server
I have created a simple tcp client-server application in vb.net. Everything works fine when i set local host (127.0.0.1) as the ip address. I wish to make a connection to a remote machine (keeping ...
-3
votes
0answers
17 views
Simple linux TCP server [on hold]
it's my first post so be polite.
I need to write a simple TCP server for linux virtual server (VPS). I've never ever programmed on other OS then Windows and Android, so it's the first difficult.
The ...
0
votes
1answer
30 views
Java TCP re-tranmission timeout
public static void main(String args[]){
byte[] message = ...
Socket socket = ...
DataOutputStream dOut = new DataOutputStream(socket.getOutputStream());
dOut.write(message); //#1
...
0
votes
2answers
40 views
tcp ip checking i missing something
I am using winpcap driver to sniff packets,
so I actually using the example of packet dump inside it to get the pkt_data etc ,
when i processing the tcp header I printing my port and i see it 80
...
0
votes
3answers
57 views
reading from tcp socket in c, and chucking data without being copied to user space
There is a peek option when I can read socket buffer without actual reading it (to learn number of bytes available for consequent reading). There is such alternative with fcntl call.
I would like to ...
1
vote
1answer
40 views
Calling accept() from multiple threads
I'm writing a concurrent TCP server that has to handle multiple connections with the 'thread per connection' approach (using a thread pool). My doubt is about which is the most optimal way for every ...
-1
votes
1answer
44 views
Client-Server connection with sockets
I have a program that multiple clients would be able to connect to a server using a socket:
private void performConnect()
{
while (true)
{
if (myList.Pending())
{
...
0
votes
1answer
30 views
Java TCP socket accept stops running code
I have some (incomplete) code here for a client/server pair, here is the server class, but for some reason unknown to me the code appears to stop running anything below the serverSocket.accept()
What ...
-1
votes
0answers
41 views
C# TCP confusion [on hold]
So I've been getting my feet wet in networking lately. I find a big feature in modern day games is their multiplayer, and the ability to interact with other players. I plan on writing a game for ...
-2
votes
3answers
57 views
UDP: What to be aware of
I'm working on a multiplayer module of my game engine. I don't have any code to post because both the server and the client are sending and receiving what I want, so this is a much more theoretical ...
0
votes
0answers
33 views
winsock error after some days working properly
I have a program that was working totally properly but after 2 days running, it started working, connection() isn't working anymore (TIMEOUT error) and I cannot realise why could that be happening.
...
-1
votes
2answers
38 views
Send byte array to iOS app from Java app (with quickserver)
I have a byte array in Java. The values are both positive and negative (since they are greater than 127 in the original unsigned array). Now I want to send this array with Quickserver ...
-3
votes
0answers
13 views
Does HTTP require a TCP 3-Way Handshake? [closed]
Does HTTP connections require a 3 way handshake? I tried packet sniffing while opening new websites on my browser but didn't see any SYN connections.
Maybe the browser sends the initial request with ...
0
votes
0answers
25 views
amazonaws.com, cloudfront.net, and akamaitechnologies.com have constant connections to my computer through firefox on port 80 and 443, why?
I have amazonaws.com, cloudfront.net, and akamaitechnologies.com using various remote addresses and various remote host names making innumerable connections through my browser of choice (firefox) all ...
2
votes
0answers
33 views
Best class design to Send XML and Receive Response in Flash
I would like to send an XML message, and receive a response from a server and decode it.
That's my class design approach, I would like to know the best design for that thing.
class XMLRequest ...
0
votes
1answer
20 views
Qt QTcpSocket async write
I'm trying to write a dynamic data to a QTcpSocket, this is how I implement it:
connect(&m_tcpSocket, SIGNAL(bytesWritten(qint64)), SLOT(written(qint64)));
//...
void MyClass::written(qint64 ...
-1
votes
2answers
37 views
How to run a C codes in remote ip using PHP TCP/IP socket connection?
I need a help to run a C codes in remote chip from PHP - TCP/IP socket connection request with some arguments?
Thanks in advance.
Regards,
A Kumar
0
votes
2answers
42 views
Synchronization issues when two threads try to write to same tcp socket simultaneouslu
I have 20 threads all sending data on single tcp socket at a time and receiving data as well. When I run my application I don’t see any synchronization issues but according to my understanding, there ...
0
votes
0answers
6 views
Getting 503 Bad Sequence
Getting 503 Bad Sequence after entering username
I have an FTP Server on a device, with user name: xyz. Before performing ftp, i have done nmap to check if the port 21 is open and it is. The device ...
-1
votes
1answer
18 views
SOAP over TCP vs SOAP over HTTP [closed]
I know about SOAP that it is a messaging protocol.I also know about the HTTP that it is a request response protocol and all other stuff and TCP is a tranmission and a bit higher level protocol. But ...
0
votes
1answer
24 views
Closing socket after subprocess.Popen leaves socket in TIME_WAIT as long as child process is still running
On Windows 7:
Given this server code:
# in server.py
if __name__ == '__main__':
serversock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# uncommenting this won't help
...