mickey911 0 Newbie Poster

Hello community,,


I have been developing a yahoomessenger chat client for nintendos handheld gaming console 'nintendo ds'.Till now i have finished laying out the user interface and wifi access via router.

I found the yahoo protocol in many places from a google search but i am unable to understand how to send the preliminary information

<------- 4B -------><------- 4B -------><---2B--->
+-------------------+-------------------+---------+
| Y M S G | version | pkt_len |
+---------+---------+---------+---------+---------+
| service | status | session_id |
+---------+-------------------+-------------------+
| |
: D A T A :
| 0 - 65535* |
+-------------------------------------------------+

my problem is how do i send this information to the server??
Do i write the above information of the packet in a structure??like

struct sMessage

{
   char msgHeader[4]; // Should be YMSG
   int  version;      // Should be 9
   WORD pkt_len;      // String length
   WORD service;      // The operation for the packet
   int  status;       // Success or failure in most cases, usually 0
   int  session;      // HTTP stuff
   unsigned char data[65536];  // The message
};

I am using PALib for ds development
palib has an inbuilt function to send information to a particular server via a socket like the following

int sock;
PA_InitSocket(&sock,"scs.msg.yahoo.com",5050,PA_NORMAL_TCP);
char buffer[256];strcpy(buffer,"hello world");
send(sock,buffer,256,0);

So will this be useful?Will sending the information to yahoo server one after one work or all the packet info should be sent at a time.

I really need this help

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.