Questions tagged [tcp]

0

votes
0

answer
3

Views

What is blocking the network connection ? Unable to do a EJB lookup between Client -server WebSphere

I have disabled 'Enable administrative security' on both client and server. using Cport i can able to see the connection is established. But still, I am getting Connection refused Please help and save my day. below is the log 18:34:49:235 IST] 000000ba SystemErr R at com.ibm.ws.util.ThreadPoo...
Anbu
1

votes
1

answer
44

Views

TCP cannot detect closed socket in client

I have server that just connects to a client and right after that disconnects, while client tries to send an integer to a closed socket (scanf is to ensure server closese it first). I use send with MSG_NOSIGNAL and check for EPIPE but the flag is not set. I think result should have printed value of...
mikol
1

votes
2

answer
4.7k

Views

alternative to readLine() method in BufferedReader?

I am new to java Network programming.I was googling the code for a TCP client in java.I came across the following example. import java.lang.*; import java.io.*; import java.net.*; class Client { public static void main(String args[]) { try { Socket skt = new Socket('localhost', 1234); BufferedReader...
liv2hak
1

votes
2

answer
354

Views

Golang TCP dial error: host is down

net.Dial('tcp', '192.168.1.100:3000') The above call give me dial tcp 192.168.1.100:3000: connect: host is down. I can successfully ping the endpoint. I wonder what will be the cause of this error. What will be the possible causes of host is down? Let me provide more details. The endpoint I am dial...
Morty Choi
1

votes
3

answer
170

Views

Python socket module: Recv() data response cut off

Explanation I'm currently trying to control a smart power strip using a python script. To accomplish this, I'm using a TCP connection with the socket module. Around 75% of the time, I get the response/data I was looking for and everything works perfectly. However, around 25% of the time, the respons...
Marco C
1

votes
4

answer
3.8k

Views

Is there any way to overcome the router port forwarding on TCP/IP application?

I need to connect to computer over TCP/IP I have the external ip but without port forwarding I can't connect to the server. Is there any way to configure the server to accepts connection on the external ip and port defined by the server without configuring the router ? (How does emule do it ? or ot...
user63898
3

votes
1

answer
113

Views

Async sending and receiving custom data packets with boost?

I am trying to asynchronously send and receive custom data packets with boost and I have some questions, based on my current implementation: tcpclient.cpp #include 'tcpclient.h' #include #include '../utils/logger.h' tcpclient::tcpclient(std::string host, int port) : _endpoint(boost::asio::ip::addre...
Kyu96
7

votes
1

answer
140

Views

How to turn off TCP PSH flag in the POSIX function send()?

I am sending commands to a stepper motor system using Ethernet. The commands get the motor to move, or respond with drive status, or configure the drive, etc... The stepper motor system sometimes hangs, or fails to execute the command, and the manufacturer having looked over everything I supplied ha...
Mike
1

votes
0

answer
493

Views

NGINX web-socket proxy for tcp

I am new to Nginx. I am able to achieve http proxy with following config: user nginx; events { worker_connections 5000; } http { upstream backends { server 127.0.0.1:8083; server 172.16.0.16:8083; } server { listen 12345; location / { proxy_pass http://backends; } } } How to achieve similar pr...
enator
1

votes
0

answer
216

Views

~200ms delay in Windows Sockets - why?

I have a performance problems with a TCP connection on Windows. My server sends a message to my client (frame 1049), which the client is supposed to answer immediately. The client does answer the message, but only with a delay of 188ms (frame 1057). The PSH bit of the server message is set. Since 18...
Christoph Albert
1

votes
2

answer
383

Views

How to know the status of tcp connect in python?

In python, tcp connect returns success even though the connect request is in queue at server end. Is there any way to know at client whether accept happened or in queue at server?
Anand
1

votes
1

answer
58

Views

Socket Exceptions due to density in Nodejs with WebSocket

I have node js server that is connected the 10k-14k client with WebSocket. When client count is up to above about ~14k, new clients begin to get the exception that: 'System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it' As far as I know, this...
Qwer Sense
1

votes
1

answer
238

Views

Node.js, how to keep server alive after a client exits?

I have a simple p2p app, but when I connect and exit as another peer or client the server stops completely. I've looked into connection.setKeepAlive, but it doesn't work they way I thought it would. I simply want the connection to any other peers to persist if another one exits. const net = require(...
sweetroll
1

votes
1

answer
45

Views

How to keep the server client connection on

I have used an existing node.js code to receive data from a GPS device. The code is functional but has one flaw. Ideally we want to keep the server-client connection alive. But it appears the connection is closed and then is opened very frequently. When I run the following code, the output is like...
Peter Lian
1

votes
0

answer
722

Views

What does Error: TCP connection reset by peer - PHP/CURL/HTTPS issues

I am stuck here: I get this Error: TCP connection reset by peer. This is my CURL Script $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url_webpay); //curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //curl_setopt($ch, CURLOPT_TIMEOUT, 60); //curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); //curl_seto...
Aderogba Otunla
1

votes
1

answer
280

Views

Implementing a client for custom TCP protocol

I have to implement a client for communication with the server by custom protocol based on XML format. This is an application layer protocol, based on TCP. So, my client sends a request XML message and receives a response, also XML message. Now, I consider how to be ensured that I received whole mes...
J. Doe
1

votes
0

answer
172

Views

Node.js, ws-tcp-relay with nats: connection error

Please help solve the problem: When I start the nats server listening 4222 port: ./gnatsd --addr localhost --port 4222, then ./ws-tcp-relay localhost:4222 -p 4223 and try to connect through websockets using websocket-nats like this (in service.js for example): 'use strict'; const nats = require('we...
Rustam Dev
1

votes
0

answer
400

Views

How can I connect Android to Arduino MKR1000 over TCP/IP protocol?

I am developing an Android app to control an Arduino MKR1000 board, by communicating over the TCP/IP networking protocol. The Arduino works as an Access Point and send data, when there is a client available. My Android app manage to connect to Arduino's WiFi shield, but I have an issue with implemen...
Barney
1

votes
0

answer
413

Views

Connecting to Informix Connection Manager Using JDBC

I need some clarification on how (some) JDBC drivers connect to (Informix) Databases. We had the issue of 'connection refused' when trying to connect to Informix connection manager from a Java application via JDBC,although access was granted via firewall. When we consulted Informix Team,they told us...
selman
1

votes
0

answer
4.2k

Views

TCP Provider: An existing connection was forcibly closed by the remote host

I'm having problems with SQL clients randomly disconnecting from the server with a TCP connection forcibly closed error message. Setup is as follows: SQL 2014 Express running on Windows Server 2008. Clients are Wi-Fi connected Microsoft Surface 3-Standard or 4-PRO's, running Windows 10 release 1703....
Jim
1

votes
0

answer
67

Views

structured data in c# to byte array and back to structured data in python

This is a long one, please be patient. I am trying to make an AI training loop between Unity3d(C#/Mono) and Python(Neural Network code here). Basically what will happen is that my C# script will send state and environment information of a self driving car equipped with 4 proximity sensors(sensor dat...
WormSandwich
1

votes
1

answer
825

Views

how to get tcp client ip and port in c# and show that?

I want to get tcp client ip address and port but I can't to do that.I want to use socket in my code except tcp listener class and my goal is get client ip and port without this class. below is my code:(I want to get client ip address and port before if(rc){} condition) namespace Example { public pa...
1

votes
1

answer
329

Views

Connecting UWP App to Remote SQL Server 2008 provider: TCP Provider, error: 0

System.Data.SqlClient.SqlException: 'A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The operation completed successfully)' I'm trying to connect to SQL Server 2008 R2 database with a UWP APP. Remote...
Lee
1

votes
0

answer
234

Views

Establish connection with websocket server using TCP

I'm trying to connect to websocket server using TCP. But, I have problems doing it - empty response coming from server. What I am doing. First, I build the 'handshake' header it looks like folows: 'GET /mqtt HTTP/1.1\r\n' + 'Host: broker.mqttdashboard.com\r\n' + 'Upgrade: websocket\r\n' + 'Connectio...
Mrg Gek
1

votes
1

answer
519

Views

Java: Using server to create P2P between two clients

I am experimenting with a file transfer program in Java and I wanted to create a server that would handle creating P2P connection between two clients. Don't know how that should work, exchanging sockets? I don't want to exchange IP address... Seen some questions similar (ev. Connecting two clients v...
Milut
1

votes
1

answer
1.4k

Views

Python TCP sockets headers

I need to create a communication between a client and a server with TCP. But I'd like to send and work with 'headers'. So from the client I'd like to send a header 'COMMAND1' and the server returns me something. I have the following code: Server import socket import threading bind_ip = '0.0.0.0' bin...
Vladislav Zhdanov
1

votes
0

answer
102

Views

Simple TCP/IP client not working as expected

I am attempting to write a very basic TCP/IP client that will simply request user input, send that input to the specified IP, then read the output. The code below does not return any of the error codes but the output is still not returning as expected. For example, the device I am testing this on sh...
slucas
1

votes
1

answer
67

Views

Why is my network stream downloading 0 bytes?

I'm currently working on a project that involves me taking a picture with my laptop camera on a given command. I'm using my webcam as a security camera right now due to the fact that I have not gotten the time to buy a real one yet so my laptop will have to do. The project is structured like this: I...
TheHappyGuy
1

votes
0

answer
166

Views

Using Linux virtual ethernet interfaces (veth) to test a custom TCP stack

If have set up a pair of virtual ethernet devices veth0 and veth1: ip link add veth0 type veth peer name veth1 # Bring the interfaces up sudo ifconfig veth0 up sudo ifconfig veth1 up sudo ifconfig veth0 1.1.1.1 sudo ifconfig veth1 1.1.1.2 Inside my application I connect to veth0 using a raw socket....
StackedCrooked
1

votes
0

answer
67

Views

TCP window size in Linux with kernel 2.4 or 2.6

Can anybody tell me why according to this site - Passive OS identification, TCP window size in Linux with kernels 2.4 or 2.6 is 5840? I mean, is there any official documentation where i can read about it? Thank you!
wizzardm
1

votes
3

answer
2.2k

Views

How TCP and SSL/TLS interacts?

SSL/TLS runs over the TCP layer. Suppose TCP connection is terminated before SSL/TLS session was closed. How would SSL/TLS get to know about this ?
The Winter Soldier
1

votes
0

answer
255

Views

Bidirectional communication with RPC

I am currently implementing an RPC interface (both client and server) about some proprietary product on top of a raw TCP connection. The documentation explicitly demands a JSON-RPC communication and it also adds the following tip: In , antenna and remote device are both server and client In the inte...
Arkon
1

votes
0

answer
77

Views

Embedded linux TCP/IP communication issue

I have TCP/IP server running under embedded linux: int sId = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); sockaddr_in servAddr; servAddr.sin_family = AF_INET; servAddr.sin_addr.s_addr = htonl(INADDR_ANY); servAddr.sin_port = htons(5000); bind(sId, (sockaddr*)(&servAddr), sizeof(servAddr)); liste...
Avert
1

votes
1

answer
365

Views

tcpdump filter to get all packets with tcp options kind equals to x

spend couple of hours looking for tcpdump filter to get all packets with tcp option kind equals to x ( specifically 8 ). Wireshark's filter is simply tcp.option_kind == 8. After reading https://www.wains.be/pub/networking/tcpdump_advanced_filters.txt tried using 'tcp[22] =8' with no luck Your assist...
Nitzan Davari
1

votes
0

answer
215

Views

NSURL Connection Error

I am using the Wikitude plugin on iOS for AR and I am getting the following errors. Sometimes it will run then other times it will just keep loading. When it does run it gives the errors but everything functions perfect. The code that loads the view is the following: self.architectWorldNavigation =...
Curtis Boylan
1

votes
1

answer
123

Views

VB.net (Peer to Peer Connection Issue)

Given the VB.net code in the image (I apologize it's an image and not text), please help solve an issue. The problem is that when I want to send a string to another device, the string is not delivered until I close the program that is running. The string should be delivered without having to close t...
user40320
1

votes
1

answer
195

Views

rtsp streaming from desktop-server to my client

I have a TCP server running on my desktop (used as a server). I want to use the RTSP streaming of a video from the server to the ijkmediaplayer client (display that on Android). How can I achieve that? Have I to run an RTSP-server also for this on my desktop? How to specify the path of the video-fil...
MSD Paul
1

votes
0

answer
274

Views

How to read with NetworkStream to get full HTTP response (proxy)?

Currently I am building TCP proxy, which works by sending HTTP request it got from browser to website and then immideately reading response from it with this code: byte[] buff = new byte[1024]; NetworkStream stream = tcpclient.GetStream(); using (MemoryStream ms = new MemoryStream()) { int length; w...
1

votes
0

answer
495

Views

Nginx TCP proxy with load balancer

I tried to create nginx tcp proxy for patroni (postgresql) databases. 15432 - postgresql 8008 - patroni, HTTP 200 if ok, all other - errors For work i use ngx_stream_core_module and ngx_stream_upstream_check_module. For every node i create stream { ... upstream db { server 127.0.0.1:15432; check int...
Tolstov Sergey
1

votes
0

answer
37

Views

.js Block TCP established connections browser plugin

I can create app over Safari: I can include script to load before page loads. Something like this: # start collection for one subnet only. when CLIENT_ACCEPTED { if [IP::addr [IP::client_addr]/8 equals 10.0.0.0] { TCP::analytics disable } } when HTTP_REQUEST { # must check subnet again to avo...
Cemtey

View additional questions