473,387 Members | 1,590 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,387 software developers and data experts.

Socket, UDP and Quake3

Background:
Im working on a remote console (rcon) for accessing dedicated quake3 servers.

Quake 3 uses UDP and Out Of Bands packets to communicate in ASCII text
(see more here http://web.archive.org/web/200108021...andsHowto.html)

I used the UDPClient.Send() and Recive() to test this and it worked quite well, except for that since i dont know how many packets
the
server will send in response to the user command, then UDPClient will halt the program while its waiting for the next packet to
arrive, and there is no way to check that it's the _last_ package, and no timeout value as far as i know.

While googling i also found this article that said that UdpClient is broken http://www.codeproject.com/buglist/udpclientbug.asp
Problem:
I went from UDPClient to using System.Net.Sockets.Socket (wich i presume is the correct to use)
but i'm confused on what the AdressFamily, and SocketType arguments do?
The help function didn't provide much in an in-depth explanation as to what these do either.

In AdressFamiliy for example there was one option for IPv4 and one for IPv6. I would like to provide both for future compatiblity.
Is that possible?

The ipAdress and Port of the host was an argument to the UDPClient.Send() method.
What/Where do i specify ip when using System.Net.Sockets.Socket, and how do i set a Timeout value?
Private Function transmit2(ByVal value() As Byte) As String
Dim udpTR As New Sockets.Socket(Sockets.AddressFamily.Unknown, Sockets.SocketType.Dgram, Sockets.ProtocolType.Udp)
Dim b As Integer = udpTR.Send(value, value.Length, Sockets.SocketFlags.OutOfBand)
Nov 21 '05 #1
0 1584

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

Similar topics

1
by: Chuck E. Cheese | last post by:
I need a php page to connect to a python created socket and sent and receive data. below is the python code which opens a socket on the localhost @ port 21567: #!/usr/bin/python2 from socket...
8
by: simon place | last post by:
Spent some very frustrating hours recoding to find a way of closing a server socket, i'd not thought it would be any problem, however, after complete failure and as a last resort, i looked at the...
3
by: Thomas Hervé | last post by:
My problem is not really python specific but as I do my implementation in python I hope someone here can help me. I have two programs that talk through a socket. Here is the code : <server>...
4
by: DreJoh | last post by:
I've read many articles on the subject and the majority of them give the same solution that's in article 821625 on the MSDN website. I'm using the following code and when a the client disconnects...
4
by: Chris Tanger | last post by:
Context: C# System.Net.Sockets Socket created with constructor prarmeters Internetwork, Stream and TCP everything else is left at the default parameters and options except linger may be changed...
0
by: Jarod_24 | last post by:
Background: Im working on a remote console (rcon) for accessing dedicated quake3 servers. Quake 3 uses UDP and Out Of Bands packets to communicate in ASCII text (see more here...
0
by: Macca | last post by:
Hi, I am writing an asychronous socket server to handle 20+ simulataneous connections. I have used the example in MSDN as a base. The code is shown at end of question. Each connection has a...
3
by: BuddyWork | last post by:
Hello, Could someone please explain why the Socket.Send is slow to send to the same process it sending from. Eg. Process1 calls Socket.Send which sends to the same IP address and port, the...
5
by: darthghandi | last post by:
I've created a class to listen to all interfaces and do a BeginAccept(). Once it gets a connection, it passes the connected socket off and stores it in a List. Next, it continues to listen for...
4
by: O.B. | last post by:
I have a socket configured as TCP and running as a listener. When I close socket, it doesn't always free up the port immediately. Even when no connections have been made to it. So when I open...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.