I know that you can use boost serialization to serialize to a text format and then push over a socket, but I'd like to serialize a class of statistics data into a binary format (both for size and encoding/decoding overhead reasons). Is it safe to use boost serialization for this?
My specific worries are:
Differences between intege...
Hello,
I am writing a small C program to understand sockets. What is the maximum length of data returned from recvfrom?
recvfrom(raw, packet_buffer, buf_size, ... );
what is the maximum buf_size in linux. Is there a constant related to this size_t?
Thanks
...
I have the following code
int ParseData(unsigned char *packet, int len)
{
struct ethhdr *ethernet_header;
struct iphdr *ip_header;
struct tcphdr *tcp_header;
unsigned char *data;
int data_len;
/* Check if any data is there */
if(len > (sizeof(struct ethhdr) + sizeof(struct iphdr) + sizeo...
I am currently using tcptrace but am observing some ridiculous throughputs on a test that I'm running. I am pretty sure something is wrong with the way I am testing but before spending any more time is there any other program I can use to verify this?
EDIT: This is for a router simulator that I am running locally on my system that gene...
Hello,
I 'am triyng to build a link between my simulink model or just a m file and my c++ applicaton but i 'am having an issue. I don't really understand how matlab receive the data. and for simulink in which form should i send the data to the block ? I would like to send coordinates like xyz to matlab and with matlab scatter3 the stre...
I've checked the tcpdump man page and thought I understood the example provided there. But the one that I am getting is something I'm not able to understand completely.
ORIGINAL: Simulator Output
LINE 1: 20:01:13.442111 IP 10.0.0.1.12345 > 10.0.0.2.54321: S 1234:1234(0) win 65535
LINE 2: 20:01:13.471705 IP 10.0.0.2.54321 > 10.0.0.1.123...
I'm thinking like the methods games like Counter Sstrike, WoW etc uses. In CS you often have just like 50 ping, is there any way to send information to an online MySQL database at that speed?
Currently I'm using an online PHP script which my program requests, but this is really slow, because the program first has to send headers and pos...
Over the years I've developed a small mass of C++ server/client applications for Windows using WinSock (Routers, Web/Mail/FTP Servers, etc... etc...).
I’m starting to think more and more of creating an IPv6 version of these applications (While maintaining the original IPv4 version as well, of course).
Questions:
What pitfalls might I...
Here's the thing. I need a daemon running on the server which basically will open an smtp connection, then it will expect calls to the process to send e-mails through the opened connection.
This is to avoid connecting to the smtp every time, instead I can receive multiple calls to the process but connection only one time.
By the way, t...
Hi,
I understand that IPX and SPX both provide connection services similar to TCP/IP. Here, IPX is similar to IP and SPX is similar to TCP and hence eager to know about this.
How does the performance of IPX/SPX exceed that of TCP in LAN ?
Why is IPX/SPX not used in LAN alone if its performance is superior to that of TCP in the case of L...
I need to check if a TCP/IP route already exists from my application and add the route if it doesn't.
Now I'm running the
route add <destination network ip address> MASK <mask> <gateway ip address>
with a Process.Start() and that's fine for me.
However, as I'm elevating the route command with a "runas" verb, I need to check first if ...
I am not sure if people find this obvious but I have two questions:
During the 3-way handshake, why is ACK = SEQ + 1 i.e. why am I ACKing for the next byte that I am expecting from the sender?
After the handshake, my ACK = SEQ + len. Why is this different from the handshake? Why not just ACK for the next byte I am expecting as well (th...
Hi, I'm working in a tile-based MMORPG and I have a problem.
Each user has a fixed position (one tile) all the time, so the rest of the users can see him there, and cannot move to that tile. So there is only one object or user in each tile.
If a user becomes invisible, the rest of the users can't see him, but they still unable to move ...
Can anyone tell me how to get interface index from interface ip address?
e.g. If interface ip address is 192.168.23.25 then what is it's interface index.
I want to add on that i need to use it in one code written in c so if any function
with some option can give me the interface index number on the base of the
interface ip address.
...
I have been trying to get to the bottom of this problem off and on for the past 2 days and I'm really stuck. Hopefully some smart folks can help me out.
The issue is that I have a function that I call in a thread that downloads a file (using Synapse libraries) from a website that is passed to it. However, I've found that every once in a...
In my program the receiver has a bigger workload, should i make the sender wait for the receiver through methods like application level ACK?
...
[Question seems a little long but please have patience. It has sample source to explain the problem.]
Consider following code which is essentially a WCF host:
[ServiceContract (Namespace = "http://www.mightycalc.com")]
interface ICalculator
{
[OperationContract]
int Add (int aNum1, int aNum2);
}
[ServiceBehavior (InstanceConte...
On Mac OS X (10.6), if I start a YouTube video download and pull the Ethernet cable for 5 or so seconds, then plug it back in, I get varying results depending on the browser. With Opera and Chrome, after I plug the cable back in the video continues to load. But with Safari and Firefox, it never does.
Using Wireshark to look at the traff...
Hi,
As per my understanding a simple TCP server will be coded as follows.
socket() - bind() - listen() - accept() - read() - write()
The clients will be written as follows.
socket() - bind()(Optional) - connect() - write() - read()
Please note the order difference in read() and write() calls between client and server program.
Is it...
Hello,
I have an arduino with an ethernet shield.
I want to know how can i connect it to internet across a firewall proxy.
e.g the Arduino Ethernet library have only this reference to demonstrate how to connect your board to internet but no clue how to do it across firewall proxy's etc.
Repeated from Arduino help pages.
#include <Et...