473,386 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to send data to peers over the net

Hi,

I am writing a game that I want to net enable.

So I want to be able to connect to peers over the internet. I will
be sending very small packets of data.

What is the best way to do this?

Do I need a middle man server?

Can someone outline how to do it please?

rotsey
Jul 25 '07 #1
3 1447
On Jul 25, 2:33 am, "Rotsey"
<malcolm_sm...@RemoveThis.optusnet.com.auwrote:
Hi,

I am writing a game that I want to net enable.

So I want to be able to connect to peers over the internet. I will
be sending very small packets of data.

What is the best way to do this?

Do I need a middle man server?

Can someone outline how to do it please?

rotsey
Depending on exactly what you are doing, you should be able to just
use TcpSockets to communicate between each other. I believe either the
VS Help or MSDN has some lengthy examples on this, so you might start
your research there.

The other option (as you suggested) is to use a "middle-man" server
that you both connect to. Doing this would allow you several options
such as an ASP.Net XML Web Service - but it would require you to have
an extra server.

Thanks,

Seth Rowe

Jul 25 '07 #2
Thanks Seth

With web services you can't send a peer a message without a request,
is that right?

So you have to loop in your client and keep requesting until the data is
returned???

"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
On Jul 25, 2:33 am, "Rotsey"
<malcolm_sm...@RemoveThis.optusnet.com.auwrote:
>Hi,

I am writing a game that I want to net enable.

So I want to be able to connect to peers over the internet. I will
be sending very small packets of data.

What is the best way to do this?

Do I need a middle man server?

Can someone outline how to do it please?

rotsey

Depending on exactly what you are doing, you should be able to just
use TcpSockets to communicate between each other. I believe either the
VS Help or MSDN has some lengthy examples on this, so you might start
your research there.

The other option (as you suggested) is to use a "middle-man" server
that you both connect to. Doing this would allow you several options
such as an ASP.Net XML Web Service - but it would require you to have
an extra server.

Thanks,

Seth Rowe

Jul 26 '07 #3
On Jul 26, 12:20 am, "Rotsey"
<malcolm_sm...@RemoveThis.optusnet.com.auwrote:
Thanks Seth

With web services you can't send a peer a message without a request,
is that right?

So you have to loop in your client and keep requesting until the data is
returned???

"rowe_newsgroups" <rowe_em...@yahoo.comwrote in message

news:11**********************@k79g2000hse.googlegr oups.com...
On Jul 25, 2:33 am, "Rotsey"
<malcolm_sm...@RemoveThis.optusnet.com.auwrote:
Hi,
I am writing a game that I want to net enable.
So I want to be able to connect to peers over the internet. I will
be sending very small packets of data.
What is the best way to do this?
Do I need a middle man server?
Can someone outline how to do it please?
rotsey
Depending on exactly what you are doing, you should be able to just
use TcpSockets to communicate between each other. I believe either the
VS Help or MSDN has some lengthy examples on this, so you might start
your research there.
The other option (as you suggested) is to use a "middle-man" server
that you both connect to. Doing this would allow you several options
such as an ASP.Net XML Web Service - but it would require you to have
an extra server.
Thanks,
Seth Rowe
Pretty much. Your best bet is probably to just go with the TcpSockets
approach - then you just configure a listener to grab any message. If
you need a high-performance option you could use the multiplayer part
of DirectX (can't remember it's name) - but it will be much harder to
configure and most examples will be in C++

Thanks,

Seth Rowe

Jul 26 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Srini | last post by:
I am a beginner to using XML for communication between processes. I have heard about using XML for passing of information between 2 applications. We have 2 desktop applications developed in VB,...
36
by: dcrespo | last post by:
Hi all, I have a program that serves client programs. The server has a login password, which has to be used by each client for logging in. So, when the client connects, it sends a string with a...
4
by: zhimin | last post by:
Hi, I'm writing a program to send large file(100m) through dotnet using TCPListener & TCPClient, I'm sending the file with a ask and response loop: 1. Client send a flag 1 to server indicate it...
13
by: Manfred Braun | last post by:
Hi All, I am trying to understand the blocking method socket.Send(). The call blocks as expected, but does this mean, it returnes after the underlying TCP layer got a confirmation, that the send...
0
by: clintonG | last post by:
The Website Administration Tool -- POS that it is -- and the CreateUserWizard -- and presumably other controls -- do not record data to the database using system time. They record data using...
17
by: Lag | last post by:
Was wondering if anyone could help me with a PHP, MySQL problem. I am completely new to PHP and MySQL. I have been trying to find a way to list data from a table on a web page and after each...
5
by: Rotsey | last post by:
Hi, I am writing a game that I want to net enable. So I want to be able to connect to peers over the internet. I will be sending very small packets of data. What is the best way to do this?...
162
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
11
by: itdevries | last post by:
Hi, I'm trying to convert some char data I read from a binary file (using ifstream) to a float type. I've managed to convert the int types but now I need to do the float types as well but it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.