DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2006

    MEssages over winsock ( code will be included )

    OK everyone heres the deal....this part of my project has alot of potential for the right person. someone can get the groundwork figured out for this and help me get it in place, i may end up having to post this in a jobs catagory for that person. right now what i need is this...

    frmMain ( main form) has sckIncoming(0) ( winsock control for incoming )

    when a message is sent to ANY user it is received by sckIncoming. heres what i need.

    take whatever is sent and break it down to where the data can be put into variables as well as used..

    i need variables to hold the remote users IP, the data type, the data and the username. what needs to happen is this,.... user1 sends a message, user2 receives it... upon receving the message it needs to figure out #1 what type of data it is.. in this case were dealing with instant message..

    datatype = IM
    RemoteIP should be the other users IP so we can send messages back to the other person.
    and the data should be the message

    basically were creating instant messaging here, we also need to be able to have multiple IM windows open at once and figure out which one belongs to which users... so....

    User1 received a message from User2 and User3. both messages should be in its own IM window and able to be sent back to the right user. SO im assuming that the username should be sent as well and we need to store the information about frmIM(0) and the index as which peron sends/received.....

    does this make sense to anyone?


  2. #2
    Join Date
    Jun 2006
    PART 1 of this insane process.... sckIncoming(0) & incoming data.

    on frmMain in the formload, should i...

    dim indata as string ( or long or what )

  3. #3
    Join Date
    Oct 2005
    string of course, over winsock connection u can send 8 KB at once using string type .
    Programmer&Cracker CS

  4. #4
    Join Date
    Jun 2006
    would it be better to send IM's and things directly to the user or should i create a mesaging server to route everything... right now the serverhandles the chatrooms, but for instant message, should i have the server handle the IM's as well... so if i send you a message it goes to the server, the server gets your info and sends it to you? Thanks!

  5. #5
    Join Date
    Oct 2005


    No it's not beter at all, the better is to make the role of the server is to make connection between clients only -If u don't plain to track and see their chat- because if u have too many chatters, u will got a trouble when tow sends at the same time and your system will be down everytime , of course u can control this but it will be over when it gets too many chater and maybe someone recives its message after 15 mins of sending it !! only if u will put this chatserver in a big very fast with highest tech server-computer u can make it like that without any problems.
    Programmer&Cracker CS

Similar Threads

  1. Speaking of strings...
    By Harlow in forum .NET
    Replies: 246
    Last Post: 10-26-2002, 12:30 AM
  2. Brain Washing
    By Danny Bowman in forum .NET
    Replies: 152
    Last Post: 09-13-2001, 07:23 AM
  3. Need help with ASPImage..my code included
    By Victoria in forum ASP.NET
    Replies: 0
    Last Post: 06-18-2001, 06:58 AM
  4. Good Editorial by Russell Jones
    By Robert G in forum .NET
    Replies: 84
    Last Post: 02-08-2001, 02:38 PM
  5. Replies: 84
    Last Post: 01-29-2001, 01:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.