RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

I don't understang how you received data

nexam

Sorceror
I don't understang how you received data

TCP protocol ok....

I have read PacketHandlers.cs & Co, but i don't understand.

I want to make a little client (without graphic) in order to make one or two action. I stop on login...

How i must send my data ?

I have make this (client code):

Code:
SendData("0x91");
SendData("?"+log.Substring(0,30)+pass.Substring(0,30)+"]");

[/code]

Code:
public void SendData(string data)
		{
			byte[] bufferSend =
				System.Text.Encoding.Default.GetBytes(data);
			try{
				m_socket.Send(
					bufferSend,0,
					bufferSend.Length,
					SocketFlags.None);
			}
			catch(Exception e){
				Console.WriteLine(e.TargetSite.ToString() + ":\n"+e.Message.ToString() );
			}
		}

Code:
public void GetData()
		{
			while(true){
				try{
					byte[] bufferGet =
						new Byte[m_socket.Available];
					
					int sortie = m_socket.Receive(bufferGet);
					
					string data =
						System.Text.Encoding.ASCII.GetString(
							bufferGet, 0, bufferGet.Length);
					
					if(data.Length != 0){
						//TEMPO
						Console.WriteLine("Data Get: "+data);
					}
				}
				catch(Exception e){
					Console.WriteLine(e.TargetSite.ToString() + ":\n"+e.Message.ToString() );
					Console.WriteLine("Try disconnect...");
					Disconnect();
				}
				Thread.Sleep(50);
			}
			
		}



Ideas ?
 

Kennyd

Sorceror
Pretty Please?

I know this topic is 3years old, but somebody out there must have a copy of this right?
*crosses fingers*

Thanks in advance
 

Acronis

Sorceror
I wrote a bot app a while back since I was bored, never really put much time into the project. This site came in very handy:

Ultima Online Protocol

It lists all the packets and their fields.

The only part I never figured out is how to do the gzip encoding stuff and the huffman tree part. Never really got deep into it.
 
Top