Questions tagged [networking]

For most programming questions use [network-programming] tag. Non-programming networking questions are off topic and should be asked on Network Engineering, Super User or Server Fault instead. This tag is only appropriate for questions concerning unique networking needs in support of software development.

networking
Filter by
Sorted by
Tagged with
3295 votes
34 answers
5.4m views

How do I find out which process is listening on a TCP or UDP port on Windows? [closed]

How do I find out which process is listening on a TCP or UDP port on Windows?
readonly's user avatar
  • 349k
1131 votes
37 answers
531k views

What is the difference between a port and a socket?

This was a question raised by one of the Software Engineers in my organisation. I'm interested in the broadest definition.
Richard Dorman's user avatar
879 votes
37 answers
1.6m views

How can I connect to Android with ADB over TCP? [closed]

I am attempting to debug an application on a Motorola Droid, but I am having some difficulty connecting to the device via USB. My development server is a Windows 7 64-bit VM running in Hyper-V, and so ...
JDM's user avatar
  • 9,797
745 votes
14 answers
965k views

What is the quickest way to HTTP GET in Python?

What is the quickest way to HTTP GET in Python if I know the content will be a string? I am searching the documentation for a quick one-liner like: contents = url.get("http://example.com/foo/bar") ...
Frank Krueger's user avatar
730 votes
50 answers
986k views

Finding local IP addresses using Python's stdlib

How can I find local IP addresses (i.e. 192.168.x.x or 10.0.x.x) in Python platform independently and using only the standard library?
UnkwnTech's user avatar
  • 89.3k
597 votes
10 answers
265k views

Comparison of Android networking libraries: OkHTTP, Retrofit, and Volley [closed]

Two-part question from an iOS developer learning Android, working on an Android project that will make a variety of requests from JSON to image to streaming download of audio and video: On iOS I have ...
Alfie Hanssen's user avatar
588 votes
21 answers
358k views

Is it possible to disable the network in iOS Simulator?

I am trying to debug some inconsistent behaviour I am seeing in an application that gets its primary data from the Internet. I don't see the issues in the simulator, just on the device, so I'd like ...
Paul Hammond's user avatar
  • 6,366
396 votes
22 answers
224k views

Artificially create a connection timeout error

I've had a bug in our software that occurs when I receive a connection timeout. These errors are very rare (usually when my connection gets dropped by our internal network). How can I generate this ...
Mark Ingram's user avatar
  • 72.7k
388 votes
28 answers
770k views

Get local IP address

In the internet there are several places that show you how to get an IP address. And a lot of them look like this example: String strHostName = string.Empty; // Getting Ip address of local machine... ...
Tono Nam's user avatar
  • 35.1k
361 votes
18 answers
1.6m views

Command line for looking at specific port

Is there a way to examine the status of a specific port from the Windows command line? I know I can use netstat to examine all ports but netstat is slow and looking at a specific port probably isn't.
user1580018's user avatar
  • 3,619
352 votes
3 answers
1.6m views

How to get a list of all valid IP addresses in a local network? [closed]

Is there a way to get a list of all valid IP addresses in a local network? I mean all IP addresses that each user is using in the network.
M.J.Ahmadi's user avatar
  • 3,931
344 votes
16 answers
729k views

How do I get Flask to run on port 80?

I have a Flask server running through port 5000, and it's fine. I can access it at http://example.com:5000 But is it possible to simply access it at http://example.com? I'm assuming that means I have ...
quantumtremor's user avatar
342 votes
24 answers
246k views

When is it appropriate to use UDP instead of TCP? [closed]

Since TCP guarantees packet delivery and thus can be considered "reliable", whereas UDP doesn't guarantee anything and packets can be lost. What would be the advantage of transmitting data using UDP ...
Jeff L's user avatar
  • 6,148
338 votes
13 answers
67k views

Best architectural approaches for building iOS networking applications (REST clients) [closed]

I'm an iOS developer with some experience and this question is really interesting to me. I saw a lot of different resources and materials on this topic, but nevertheless I'm still confused. What is ...
MainstreamDeveloper00's user avatar
333 votes
8 answers
197k views

What is P99 latency?

What does P99 latency represent? I keep hearing about this in discussions about an application's performance but couldn't find a resource online that would talk about this.
maverik's user avatar
  • 3,559
332 votes
5 answers
367k views

What is the difference between active and passive FTP?

Can someone tell me what is the difference between active and passive FTP? Which one is preferable?
karthik's user avatar
  • 4,645
312 votes
5 answers
160k views

What do pty and tty mean?

I noticed many mentions of pty and tty in some open source projects, could someone tell me what do they mean and what is the difference between them?
why's user avatar
  • 24.4k
307 votes
15 answers
530k views

Capturing mobile phone traffic on Wireshark

How can I capture mobile phone traffic on Wireshark?
Xara's user avatar
  • 8,938
298 votes
7 answers
299k views

Network usage top/htop on Linux [closed]

Is there a htop/top on Linux where I get to sort processes by network usage?
xxxxxxx's user avatar
  • 5,097
276 votes
20 answers
522k views

Android check internet connection [duplicate]

I want to create an app that uses the internet and I'm trying to create a function that checks if a connection is available and if it isn't, go to an activity that has a retry button and an ...
iamlukeyb's user avatar
  • 6,527
270 votes
22 answers
976k views

How do I resolve the "java.net.BindException: Address already in use: JVM_Bind" error?

In Eclipse, I got this error: run: [java] Error creating the server socket. [java] Oct 04, 2012 5:31:38 PM cascadas.ace.AceFactory bootstrap [java] SEVERE: Failed to create world : ...
Caffeinated's user avatar
  • 12.2k
267 votes
5 answers
601k views

Increasing the maximum number of TCP/IP connections in Linux

I am programming a server and it seems like my number of connections is being limited since my bandwidth isn't being saturated even when I've set the number of connections to "unlimited". How can I ...
user avatar
262 votes
16 answers
165k views

Network tools that simulate slow network connection [closed]

I would like to visually evaluate web pages response time for several Internet connections types (DSL, Cable, T1, dial-up etc.) while my browser and web server are on the same LAN or even on the same ...
MaxK's user avatar
  • 3,541
258 votes
11 answers
290k views

Forward host port to docker container

Is it possible to have a Docker container access ports opened by the host? Concretely I have MongoDB and RabbitMQ running on the host and I'd like to run a process in a Docker container to listen to ...
JoelKuiper's user avatar
  • 4,490
254 votes
9 answers
318k views

close vs shutdown socket?

In C, I understood that if we close a socket, it means the socket will be destroyed and can be re-used later. How about shutdown? The description said it closes half of a duplex connection to that ...
user avatar
249 votes
18 answers
1.4m views

java.net.ConnectException: Connection refused

I'm trying to implement a TCP connection, everything works fine from the server's side but when I run the client program (from client computer) I get the following error: java.net.ConnectException: ...
Samantha Catania's user avatar
249 votes
21 answers
959k views

An existing connection was forcibly closed by the remote host

I am working with a commercial application which is throwing a SocketException with the message, An existing connection was forcibly closed by the remote host This happens with a socket connection ...
peter's user avatar
  • 13.3k
246 votes
13 answers
359k views

What is the largest Safe UDP Packet Size on the Internet

I've read a number of articles about UDP packet sizes but have been unable to come to a conclusion on whats correct. A number of services restrict the largest UDP packet to 512 bytes (like dns) ...
K M's user avatar
  • 3,244
239 votes
18 answers
1.1m views

How to close TCP and UDP ports via windows command line

Does somebody knows how to close a TCP or UDP socket for a single connection via windows command line? Googling about this, I saw some people asking the same thing. But the answers looked like a ...
Victor Stafusa - BozoNaCadeia's user avatar
233 votes
10 answers
445k views

Maximum packet size for a TCP connection

What is the maximum packet size for a TCP connection or how can I get the maximum packet size?
Alexa's user avatar
  • 2,361
228 votes
4 answers
334k views

Access HTTP response as string in Go

I'd like to parse the response of a web request, but I'm getting trouble accessing it as string. func main() { resp, err := http.Get("http://google.hu/") if err != nil { // handle ...
Tibor Szasz's user avatar
  • 3,117
226 votes
5 answers
179k views

What is the difference between 127.0.0.1 and localhost

Assuming the following is defined in .../hosts: 127.0.0.1 localhost What, if any, are the actual differences between using 127.0.0.1 and localhost as the server name, especially when hitting ...
Bohemian's user avatar
  • 419k
226 votes
14 answers
59k views

A clean, lightweight alternative to Python's twisted? [closed]

A (long) while ago I wrote a web-spider that I multithreaded to enable concurrent requests to occur at the same time. That was in my Python youth, in the days before I knew about the GIL and the ...
jkp's user avatar
  • 80.2k
225 votes
14 answers
276k views

UDP vs TCP, how much faster is it? [closed]

For general protocol message exchange, which can tolerate some packet loss. How much more efficient is UDP over TCP?
Net Citizen's user avatar
  • 5,234
224 votes
13 answers
370k views

How to provide user name and password when connecting to a network share

When connecting to a network share for which the current user (in my case, a network enabled service user) has no rights, name and password have to be provided. I know how to do this with Win32 ...
gyrolf's user avatar
  • 3,832
224 votes
19 answers
228k views

How to find an available port?

I want to start a server which listen to a port. I can specify port explicitly and it works. But I would like to find a port in an automatic way. In this respect I have two questions. In which range ...
Roman's user avatar
  • 128k
220 votes
16 answers
787k views

ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known [closed]

I am trying to set up a VPN with a Raspberry Pi, and the first step is gaining the ability to ssh into the device from outside my local network. For whatever reason, this is proving to be impossible ...
qaxf6auux's user avatar
  • 2,664
216 votes
11 answers
56k views

Why is SCTP not much used/known

I recently checked out the book "UNIX Network Programming, Vol. 1" by Richards Stevens and I found that there is a third transport layer standard besides TCP and UDP: SCTP. Summary: SCTP is a ...
dmeister's user avatar
  • 35.1k
215 votes
17 answers
163k views

Simulating Slow Internet Connection [closed]

I know this is kind of an odd question. Since I usually develop applications based on the "assumption" that all users have a slow internet connection. But, does anybody think that there is a way to ...
user avatar
213 votes
7 answers
66k views

protobuf vs gRPC

I try to understand protobuf and gRPC and how I can use both. Could you help me understand the following: Considering the OSI model what is where, for example is Protobuf at layer 4? Thinking through ...
lony's user avatar
  • 7,304
209 votes
11 answers
459k views

Freeing up a TCP/IP port? [closed]

netstat -tulnap shows me what ports are in use. How to free up a port in Linux?
user avatar
197 votes
15 answers
172k views

Detect network connection type on Android

How do you detect the network connection type on Android? Is it through ConnectivityManager.getActiveNetworkInfo().getType(), and is the answer limited to Wifi and mobile?
hpique's user avatar
  • 120k
186 votes
11 answers
342k views

How to validate IP address in Python? [duplicate]

What's the best way to validate that an IP entered by the user is valid? It comes in as a string.
krupan's user avatar
  • 3,950
185 votes
17 answers
1.2m views

java.net.SocketException: Connection reset

I am getting the following error trying to read from a socket. I'm doing a readInt() on that InputStream, and I am getting this error. Perusing the documentation suggests that the client part of the ...
user avatar
183 votes
5 answers
732k views

ping response "Request timed out." vs "Destination Host unreachable"

When I ping an IP address, what is the difference between Request timed out and Destination host unreachable returned from the command?
Suresh Kumar Veluswamy's user avatar
182 votes
8 answers
158k views

How to get access to webpack-dev-server from devices in local network?

There is some webpack dev server config (it's part of the whole config): config.devServer = { contentBase: './' + (options.publicFolder ? options.publicFolder : 'public'), stats: { modules: ...
malcoauri's user avatar
  • 12.1k
182 votes
28 answers
146k views

ConnectivityManager getNetworkInfo(int) deprecated

Using compileSdkVersion 23, however trying to support as far back as 9. getNetworkInfo(int) was deprecated in 23. The suggestion was to use getAllNetworks() and getNetworkInfo(Network) instead. ...
kyleED's user avatar
  • 2,357
177 votes
22 answers
274k views

How can I see if there's an available and active network connection in Python?

I want to see if I can access an online API, but for that, I need to have Internet access. How can I see if there's a connection available and active using Python?
aF.'s user avatar
  • 65.8k
172 votes
4 answers
210k views

Event for Handling the Focus of the EditText

Can anyone suggest to me any event related to the focus of the EditText? My application contains an EditText, which accepts a URL in it. Now my problem is that, that after the user will enter the URL ...
Sheetal Shelar's user avatar
168 votes
12 answers
707k views

What causes a TCP/IP reset (RST) flag to be sent?

I'm trying to figure out why my app's TCP/IP connection keeps hiccuping every 10 minutes (exactly, within 1-2 seconds). I ran Wireshark and discovered that after 10 minutes of inactivity the other ...
Luke's user avatar
  • 18.8k

1
2 3 4 5
767