tcp

How to host WCF through TCP Ports?

How to host wcf services,through TCP Ports,and how to listen to it?,and consume services through these TCP ports? i.e apart from net.tcp binding,is there someway to host and consume using TCP Ports.? ...

How can I rate limit an upload using TcpClient?

I'm writing a utility that will be uploading a bunch of files, and would like to provide the option to rate limit uploads. What is the best approach for rate limiting uploads when using the TcpClient class? My first instinct is to call NetworkStream.Write() with a limited number of bytes at a time, sleeping between calls (and skipping a ...

Adding web reference on client when using Net.TCP

Hi everyone... I am trying to using Net.TCP in my WCF Service, which is self hosted, when i try to add this service reference through web reference to my client, i am not able access the classes and methods of that service, can any have any idea to achieve this... How I can add web references in this case. My Service has one method (Get...

Who's Messing Up this TCP Connection?

I'm responsible for some embedded software that has to work with a customer's proprietary TCP interface (also embedded, but running under a well known and well regarded RTOS), but it's not getting through the three-way handshake, even though the HTTP interface, etc., all work fine, and I can communicate using the custom protocol with a p...

Ajax using JS, but WITHOUT XMLhttp AND using the same socket every time?

Is it possible to communicate and update data in a page without reloading, but without using the XMLHttpRequest object, AND sharing the same connection or socket every time (so, without closing the connection for every request)? ...

How to find the port number of the caller of a web service in ASP.NET?

I have a web service that is running on IIS (6 or 7, doesn't matter) and I would like to know the port that the caller has sent their request/invocation from. So if a client makes a call on my web service, how do I find out from the server side what the port number is they made the call from? Is that something that even gets passed at ...

Networking for two firewalled computers

Say, I have two computers behind firewalls, routers, etc (ie. no incoming connections). Is there ANY way I can connect the two through TCP/UDP protocol without everything going through a special server somewhere? I know Skype does something like that, perhaps not exactly. Thanks. ...

TCP or UDP help with a server/client in c#?

Hi there, Can anyone help, i trying to figure what i need to do, i have been given the tasks of writing a server and a client in TCP (UDP). basically multiple clients will connect to the server.. and the server sends MESSSAGES to the client. I have no problem in creating the server and client but with tcp i am unsure whcih way to go. D...

Is there a way to force a jdbc connection to use TCP?

In a normal SQL Server 2005 connection string, it's possible to specify the desired protocol in the following format: Data Source=tcp:myServerAddress; Initial Catalog=myDataBase; Integrated Security=SSPI; Is there a way to do something similar in a JDBC connection string to SQL Server? Edit: My JDBC Connection String looks like this...

What is the best way to make TCP and UDP packet spoofing and injection?

Hy folks, I'm kinda new to low level networking. I need to intercepts all TCP/UDP packets and potentially filter or substitute them with new ones. What would be the best way to intercept these packets and inject new one? I'm only targeting Windows platforms. ...

Why does a tcp remoting client needs to listen?

When a remoting client creates a TcpClientChannel object, it listens on an (unspecified) port. What for? A single tcp connection to the server is already a full duplex, so why listen? ...

When is it appropriate to use UDP instead of TCP?

Since TCP guarantees packet delivery and thus can be considered "reliable", whereas UDP doesn't guarantee anything and packets can be lost, what would the advantage be of transmitting data using UDP in an application rather than over a TCP stream? In what kind of situations would UDP be the better choice, and why? I'm assuming that UDP ...

"Sliding Window" - Is it possible to add reliability to a protocol and avoid flow control Implementation?

As a part of a personal project, I am making an application level protocol (encapsulated in UDP) which is reliable. For the implementation of reliability, I have to keep track of which packets i send, and which packets are received at the other receiver end. This is done with the help of a sliding window, and it also maintains the flow-...

Flow control Sliding window implementation. Which is better static-queue(array) vs dynamic linked-list?

I am implementing a sliding window for a trivial protocol. I was implementing the window using a static circular queue (array), as i though it is efficient. But one of my friends said, he has seen the implementation of sliding window in tcp, it uses a linked list. I dont think he has seen, as he doesnot know where is network code located...

Is there a way to set TCP options using the sockets API?

I am relatively new to socket programming so this may sound like a very lame question. I have to use authenticated TCP(MD5 as a TCP option to start with) as a transport for some application. I was wondering if this could be done using the sockets API or there is some other form of an existing TCP APIs that I could use to do the same. I w...

Ruby TCPSocket write doesn't work, but puts does?

I'm working on a Ruby TCP client/server app using GServer and TCPSocket. I've run into a problem that I don't understand. My TCPSocket client successfully connects to my GServer, but I can only send data using puts. Calls to TCPSocket.send or TCPSocket.write do nothing. Is there some magic that I'm missing? tcp_client = TCPSocket.ne...

How does a system's TCP/IP stack differentiate between multiple programs connecting to the same address and port?

Suppose two web browsers are running on the same computer and are accessing the same website (in other words, accessing the same IP address on the same port). How does the operating system recognize which packets are from/for which program? Does each program have a unique id field in the TCP header? If so, what is the field called? ...

Transferring an Image using TCP Sockets in Linux

I am trying to transfer an image using TCP sockets using linux. I have used the code many times to transfer small amounts but as soon as I tried to transfer the image it only transfered the first third. Is it possible that there is a maximum buffer size for tcp sockets in linux? If so how can I increase it? Is there a function that does ...

Discovering clients on a wifi network

I'm writting a java application, and I need to quickly discover any other running clients on any wired or wireless local networks in order to establish a TCP connection. what's the best way of doing this? Are there libraries or code snippets that would do this? ...

Test to see if a socket is open in linux

I have a linux server program that waits for incoming connections from a client and depending on what command you send it performs a different connection. Here is the pseudo-code setup_socket(); while(1) { listen(); newfile_descriptor = accept(); int command read(newfile_descriptor,&command,sizeof(int)); switch(command) ...