I tried the following:
int sockfd = socket(...);
listen(sockfd, 10);
accept(sockfd, ...);
None of the calls failed, and the program just started blocking as if I had called bind(). What will happen in this case? Will it just be impossible to ever receive a connection, since it has no local address or port? Or was it implicitly assigne...
I need a way to trigger events on remote processes "over the wire" and pass parameters (xml serialization, whatever). I want to be able to do things like this.
foreach(childClient c in clientList)
{
MyEvent += c.EventHandler;
}
MyEvent("param");
what technologies are good for this? WCF?
This is a small deployment in house softwa...
Hello, I am trying to make a simple game that goes across a TCP network.
The server does something like this to check for connections, in Server.java:
try
{
server = new ServerSocket(port);
System.out.println("Server started on port " + port);
while (true)
{
socket = server.accept();
System.out.println(...
I can't access my host machine from my guest machine using the computer name (i.e. WINS). I can access it using whatever IP address it happens to have at the time, but I need a consistent way of accessing it (even if I'm not online).
I have a Windows Server 2003 guest virtual machine and a Vista host. I'm using Shared Networking (NAT)...
I'm sure there has to be an easy way to do this, maybe I'm making more work for myself than I need to. I'm trying to set up cross system communications in a way that I can have bi-directional communication between objects, I imagine it would be something like this.
public interface ISharedResource
public class SharedResourceHost : ISh...
I just recently discovered traceroute and whois. As a newbie discovering these tools, I feel like I can potentially learn and explore a lot just from accessing random websites. Can anyone tell me about other useful tools/information I could use to explore the internet?
I just found out about nmap and wireshark. Haven't used either yet.
...
Hi
I wanted to know How to Disable Windows TCP/IP Stack in VC++ [ Programmatically ].
We are doing some raw socket programming using winpcap. So our application does not need Windows TCP/IP Stack and We Want to uninstall it the moment our application starts.
Please help.
Thanks in Advance.
...
I am writing a daemon running on an embedded platform that needs to change the default route of the device according to which interface it is connecting on at a given time. How can I do this programatically? I know I can use system("route del default && route add default gateway blah"); etc but is there a more direct way?
UPDATE: I so...
netstat -tulnap
shows me what ports are in use. How to free up a port, in Linux?
...
Hi there...
I'm working on a C daemon that monitors a configuration file (updated using a web interface) and then uses the Linux "tc" (traffic control) command to update the systems traffic shaping configuration.
What's a good way to actually invoke the tc program? Should I use the exec family? Is there a library I can use that would b...
Hi,
I used pcap_sendPacket() to send raw UDP packet which i crafted manually.
i want to increase the performance of my code by reducing the
context switches.
But i got the sample code about pcap_sendqueue_queue() function
it sends variable number of packets in a time.but it reads read from
the already dumped .pcap file and .cap fi...
Hi all,
I am implementing a HTTP caching proxy server in C++.I am done with most part of it but i am stuck at a point.
What i am doing is creating each thread with a socket to handle each time a request from browser comes. I parse the request, check for its availability in cache and if not found forward it to end www server.In both cases...
I have a server and has 2 clients connecting to it through TCP.
These clients continuously send information to the server.
This is a proxy server and relays the messages it receives from the client.
But it has to do relay the messages alternately. i.e. message from client A, then message from client B and again A then B and so on.
This I...
For frequent network troubleshooting purposes, do you know a publicly pingable host with an easy to remember IP address (such as 1.2.3.4)?
...
I have tried to create a simple program in different languages (C#, Java, C++, PHP) to connect to a server and all behaved in the same way. So I believe this problem is more of a OS level thing.
Basically I want the program to connect to the server with a TCP socket and send 1 byte and then close the socket. This needs to done thousands...
I'm using jcreatorLE and JDK 1.6 to run my program. I don't know why I get an error when I try to run.
Could somebody explain the reason to me?
This is the code for the Server:
import java.io.*;
import java.net.*;
class ServidorTCP {
// variable to wait for connections
private static ServerSocket servidor = null;
// Variable...
I am porting a communications library from Linux to Windows. I know what my approach is for the most part. The library uses all raw ethernet level frames for all the communications.
The library I am porting from makes use of the PF_PACKET family and the struct sockaddr_ll. After browsing through the MSDN winsock site, I haven't fou...
I am trying to get some simple UDP communication working on my local network.
All i want to do is do a multicast to all machines on the network
Here is my sending code
public void SendMessage(string message)
{
var data = Encoding.Default.GetBytes(message);
using (var udpClient = new UdpClient(AddressFamily.Inte...
Obviously, you can't push data to a web application, as HTTP works in a request-response cycle.
But what hacks/methods do you know of that can imitate pushing data to a client?
...
Can we find the internet bandwidth from the time it takes to ping a server if yes how is it done
...