Thread: Client/ server help 508.

Results 1 to 3 of 3
  1. #1 Client/ server help 508. 
    AKA Edvinas
    Ed's Avatar
    Join Date
    Jun 2009
    Age
    31
    Posts
    4,501
    Thanks given
    523
    Thanks received
    512
    Rep Power
    2659
    Let's say I want to Send message to chatbox or something on server, i'd go to a certain class file and add
    Code:
    			p.frames.sendMessage(p, "message");
    but how the hell am I supposed to do it on client?
    I mean, let's say on KeyListener, I want a sendMessage function to be activated when someone clicks "CTRL". I know how to make a certain action on keyboard key click, but how do you do you make it activate a server-sided function like the sendmessage, interfaceId, requestGFX etc.?

    Thanks in advance, Ed
    Reply With Quote  
     

  2. #2  
    Renown Programmer and Respected Member
    Maxi's Avatar
    Join Date
    Jun 2008
    Posts
    3,197
    Thanks given
    281
    Thanks received
    1,095
    Rep Power
    1366
    You can do two things:

    Program it into the client, which seems not really the best way to go if you would ask me. You would go to the packet in the packetparser for sendmessage, and then find the client side sendmessage method.

    Other possibility would be to make a client side packet, that is sent when the keylistener is used, with information what key is hit etc, and let the server process it to write the correct sendmessage packet back to the client.

    If I was not clear enough just tell me .
    Reply With Quote  
     

  3. #3  
    AKA Edvinas
    Ed's Avatar
    Join Date
    Jun 2009
    Age
    31
    Posts
    4,501
    Thanks given
    523
    Thanks received
    512
    Rep Power
    2659
    Thanks for answer. I didn't understand much of it, but it's ok. It seems kinda complicated and I don't really want to spend lots of time doing this.
    I just thought if it's easy to do I'll do it just for fun because I'm bored, but seeing as it won't be as easy it's ok, I'll go do something else

    Thanks
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •