network-protocols

Is Stream.Read buffered when doing network I/O?

一个人想着一个人 提交于 2019-12-05 19:28:48
So I was recently doing some work, when somebody told me that if doing a Stream.Read on a network stream that is obtained from calling one of .NET's GetResponseStream on a WebResponse or those are buffered. He was saying that if you were to put a breakpoint, in the code where you're reading, you wouldn't stop the network traffic. I find that bizzare, but also hoping that it's true. How does that work? Is it even accurate? using (Stream webResponseStream = this.webResponse.GetResponseStream()) { byte[] readBuffer = new byte[bufferSize]; int bytesRead = webResponseStream.Read(readBuffer, 0,

First packet to be sent when starting to browse

倖福魔咒の 提交于 2019-12-05 05:02:37
问题 Imagine a user sitting at an Ethernet-connected PC. He has a browser open. He types "www.google.com" in the address bar and hits enter. Now tell me what the first packet to appear on the Ethernet is. I found this question here: Interview Questions on Socket Programming and Multi-Threading As I'm not a networking expert, I'd like to hear the answer (I'd assume it is "It depends" ;) ). With a tool like Wireshark, I can obviously check my own computers behaviour. I'd like to know whether the

Creating Peer to Peer connections using intermediate server

这一生的挚爱 提交于 2019-12-05 02:20:37
问题 I want to connect two clients (via TCP/IP sockets). The clients can discover each other using an intermediate server. Once the clients discover each other, there should not be any involvement of the server. I made some study about this and found many people suggesting JXTA . But I'd like to create the protocol myself from scratch (because in future I might have to implement the same using WebSockets as well (when my client is a Browser)). Currently, my clients can be Desktop applications or

Difference between Internal IP Address and External IP Address

喜你入骨 提交于 2019-12-04 20:55:15
Can anyone tell me what is difference between Internal IP Address and External IP Address? How to get both in any programming language like Java, C# or Adobe AIR? Internal IP address is the address from your network: IPHostEntry heserver = Dns.GetHostEntry(Dns.GetHostName()); IPAddress curAdd = heserver.AddressList[0]; curAdd.ToString(); Your external IP address is the address from your ISP string ip = new System.Net.WebClient() .DownloadString(("http://www.whatismyip.com/automation/n09230945.asp")); You can use the following code (in java) to get the local IP address: public String

linux support 802.1ag and Y1731

江枫思渺然 提交于 2019-12-04 19:41:44
What I need to do is to use CFM OAM (802.1ag) open source client on OpenWRT routers running linux Is there is any implementation in Linux networking stack for 802.1ag ? Y1731 ? If yes please mention the linux version. 来源: https://stackoverflow.com/questions/12568284/linux-support-802-1ag-and-y1731

How to forward HTTPS traffic from a SOCKS proxy to HTTP proxy

我的未来我决定 提交于 2019-12-04 19:34:55
I have written a SOCKS proxy which works with both HTTP and HTTPS traffic if chaining is turned off. If chaining is turned on and the forwarding host and port belong to a filtering HTTP proxy then only HTTP traffic can flow. HTTPS traffic does not flow and reports an SSL error. Note that the HTTP proxy does handle HTTPS traffic when the request is coming direct from the browser and not from the SOCKS server. As an example if I make a request to https://www.google.com the following occurs: 1) Client sends a SOCKS 5 greeting to let us know which auth methods are acceptable. 2) Server responds

Whether there is a UDT backend for boost::asio?

拟墨画扇 提交于 2019-12-04 13:14:46
问题 Please, tell to me are whether exist UDT protocol backend for boost::asio? UDT is a reliable UDP based application level data transport protocol for distributed data intensive applications over wide area high-speed networks. ( http://udt.sourceforge.net/index.html ) 回答1: TCP, UDP, and ICMP are supported by Boost.Asio. Other protocols can be implemented by extending the Protocol type requirements. There are several threads on the asio-users mailing list discussing adding support for SCTP, you

Android phone development - UDP services

筅森魡賤 提交于 2019-12-04 12:02:53
I'm interested in the viability of implementing an Android application that interacts with a UDP service. I'm sure Android supports UDP: http://www.helloandroid.com/tutorials/simple-udp-communication-example What I'm less clear about is whether or not such an application would actually work on an Android phone on a typical tariff - for bidirectional communication. I want the Android client to contact a remotely hosted service by UDP (announcing itself) and for the server to subsequently notify the Android device about real-time events. I'm concerned that a mobile device on a commercial network

Where is the Don't Fragment Bit of the IP Flags used?

℡╲_俬逩灬. 提交于 2019-12-04 10:52:50
问题 I am curious to know where the "Don't Fragment" [DF] Bit of the IP Flags is used. As fragmentation is invisible to higher layers and they don't care too. I am also looking for an example. Thanks a lot in advance. 回答1: Fragmentation is not always invisible to all upper layers. Some early (and probably even current) micro-controller TCP/IP stacks did not implement the full capabilities such as fragmentation handling. Use of the flag in that situation would ensure that the packet arrived in its

Tools for experimental Protocol Design & Development?

白昼怎懂夜的黑 提交于 2019-12-04 09:31:14
问题 Are there any open source, high level tools that would facilitate and simplify development of experimental network protocols (TCP/UDP) using a GUI? Basically, something like a dynamic state machine editor that would allow you to define "packets", "messages", "states", "validators", "handlers" etc. Preferably, such a tool would be comprehensive enough to deal with all relevant aspect of the protocol (i.e. client & server), so that the high level protocol description could be serialized out to