network-programming

How to send raw data over a network?

Hi everyone! I've same data stored in a byte-array. The data contains a IPv4 packet (which contains a udp-packet). I want to send these array raw over the network using C# (preferred) or C++. I don't want to use C#'s udp-client for example. Does anyone know how to perform this? Sorry for my bad English and thanks for your help in adv...

Broadcast-style Bluetooth using Sockets on the iPhone?

Is there any way to open a broadcast bluetooth socket, take a listen and send replies? I want a proper peer to peer system where I broadcast and listen for broadcasts in an area. That way, variable clients can mingle. Is this possible? My theory is this: If GameKit can sit around wasting 25 seconds of the users time whilst having ac...

Can boost::asio only receive full UDP datagrams?

I am working on a UDP server built with boost::asio and I started from the tutorial customizing to my needs. When I call socket.receive_from(boost::asio::buffer(buf), remote, 0, error); it fills my buffer with data from the packet, but, if my understanding is correct, it drops any data that won't fit in the buffer. Subsequent calls to re...

Is there any reason for a blocking call to winsock send() function on Vista to return immediately ?

Hi All, Is there any reason for a blocking call to winsock's send() function on Vista to return immediately ? It works with expected delay on XP and below. I'm wondering if this has got anything to do with auto-tuning feature of Vista. Code: char *pBuffer; // pointer to data int bytes; // total size int i = 0, j=0; w...

Sending the array of arbitrary length through a socket. Endianness.

Hi everyone, I'm fighting with socket programming now and I've encountered a problem, which I don't know how to solve in a portable way. The task is simple : I need to send the array of 16 bytes over the network, receive it in a client application and parse it. I know, there are functions like htonl, htons and so one to use with uint16 ...

Best Cross Platform Networking Framework For iPhone Dev

I am looking to write a client/server application that will run on both iPhone, OS X and Windows. What are the best solutions for networking that will work on all 3 platforms? I have looked into Qt and it doesn't look like it has support for iPhone. I have also looked at boost, and that looks like it can be compiled for the iPhone. Howe...

c# GUI changing a listbox from another class

I've written a multithreaded server that uses tcplistener and a client handler class that controls input and output. I also have a GUI chat client. The chat client works fine and the console version of the server also works well. I have a start() method in the partial(?) Form class, which I run from a new thread when I click a button, t...

flex imap library

Hey all, I'm looking for an imap library to use in flex but can't find any. I know that can be done from scratch, but thought i should ask before reinventing the wheel. Thanks in advance for any pointers. ...

Java me : Can we retrieve bluetooth address of connected device from an open slave connection ?

Here is a typical sequence of events that occur : Host device opens a service ( Host device accepts and opens all incoming connections) A remote device connects to host device. Now, we have a slave connection open at host device. At host device, I want to know the bluetooth address of remote device. I can always pass it as data from ...

Error on MulticastSocket.joinGroup()

I'm trying to execute a simple example of Multicast sockets on Java. MulticastSocket s = new MulticastSocket(6789); InetAddress group = InetAddress.getByName("230.1.1.1"); s.joinGroup(group); This code generates the error: IP_ADD_MEMBERSHIP failed (out of hardware filters?) Any idea? ...

Basic client/server programming

I am new to web programming...I have been asked to create a simple Internet search application which would allow transmit to the browser some data stored remotely in the server. Considering the client/server architecture (which I am new to) I would like to know if the "client" is represented only by the Internet browser and therefore th...

There's a black hole in my server (TcpClient, TcpListener)

Hi, I'm trying to build a server that will receive files sent by clients over a network. If the client decides to send one file at a time, there's no problem, I get the file as I expected, but if it tries to send more than one I only get the first one. Here's the server code: I'm using one Thread per connected client public void Proce...

check if remote host is up in python

How would I check if the remote host is up without having a port number? Is there any other way I could check other then using regular ping. There is a possibility that the remote host might drop ping packets ...

C++ networking simple send and receive

I'm trying to link 10 computers together, the program I would like to write would have one 'control' computer. From what I've looked up this computer would take all the packets sent over the network and do a echo with them... right? The other computers would need to be able to send information (then echoed to the others) to the 'control'...

IP address problem

I built a TicTacToe game application (I'm using TCP protocol) that consist of server and client (that run two times to represent the 2 opponents). I have a problem and I can't find the solution for it, that is why I'm asking this question. the problem is : when the client try to connect the server on my machine, it never connect because ...

10013 error (AccessDenied) on Silverlight Socet application

I am writing silverlight 3 application which is working on network. It works like client-server application. There is WinForm application for server and silverlight application for client. I use TcpListener on server and connect from client to it with Socket. In local network it works fine, but when I try to use it from internet it don't...

WCF net.tcp windows service - call duration and calls outstanding increases over time

I have a windows service which uses the ServiceHost class to host a WCF Service using the net.tcp binding. I have done some tweaking to the config to throttle sessions as well as number of connections, but it seems that every once in a while my "Calls outstanding" and "Call duration" shoot up and stay up in perfmon. It seems to me I ha...

How to access Linux directories/files from a Windows Service using C#

Hi, I have a C# Windows Service that needs to access to a Linux computer to get a list of files in a particular directory. What .NET 3.5SP1 method would one use that allows me to do this? Thanks. ...

What are the qualities and skill set you should have to be network programmer?

Hello everyone, I am new to programming. I have lots of interest in networking and want to be network programmer. Can someone please tell me, "what are the qualities and skill set you should have to be network programmer"? Thanks & Regards, Rupesh ...

How to change internal buffer size of DataInputStream

I'm using this kind of code for my TCP/IP connection: sock = new Socket(host, port); sock.setKeepAlive(true); din = new DataInputStream(sock.getInputStream()); dout = new DataOutputStream(sock.getOutputStream()); Then, in separate thread I'm checking din.available() bytes to see if there are some incoming packets to read. The proble...