Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Protocol for communicating over socket ?

Protocol for communicating over socket ?

Scheduled Pinned Locked Moved Design and Architecture
questionsysadminalgorithmsxml
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Noctris
    wrote on last edited by
    #1

    Hi, I've been searching the web for months but although there is a lot of stuff to find about sockets between client and server, I've found very little on designing a protocol to talk over this socket. For what i need (basic question/response and synchronizing data, which i currently do using xml), there is little to find. And so i learned a lot of hard lessons involving recoding a lot of the app due to stupid errors which i did not forsee due to lack of experience. Does anyone know some sources for more information about this subject or have a view on protocols for client/server apps? It's my first Client/Server application and I feel like i am in the dark.

    R 1 Reply Last reply
    0
    • N Noctris

      Hi, I've been searching the web for months but although there is a lot of stuff to find about sockets between client and server, I've found very little on designing a protocol to talk over this socket. For what i need (basic question/response and synchronizing data, which i currently do using xml), there is little to find. And so i learned a lot of hard lessons involving recoding a lot of the app due to stupid errors which i did not forsee due to lack of experience. Does anyone know some sources for more information about this subject or have a view on protocols for client/server apps? It's my first Client/Server application and I feel like i am in the dark.

      R Offline
      R Offline
      Ray Cassick
      wrote on last edited by
      #2

      A 'Protocol' is nothing more than an agreed upon conversation. When you walk up to someone and say hello and expect a hello in response you have a protocol. You are free and open to do what you want really but since you are shuffling files back and forth perhaps you want to look at an established file transfer protocol. Loop up RFC 959 for FTP[^] and start reading.


      FFRF[^]

      View Ray Cassick's LinkedIn profile[^]

      N 1 Reply Last reply
      0
      • R Ray Cassick

        A 'Protocol' is nothing more than an agreed upon conversation. When you walk up to someone and say hello and expect a hello in response you have a protocol. You are free and open to do what you want really but since you are shuffling files back and forth perhaps you want to look at an established file transfer protocol. Loop up RFC 959 for FTP[^] and start reading.


        FFRF[^]

        View Ray Cassick's LinkedIn profile[^]

        N Offline
        N Offline
        Noctris
        wrote on last edited by
        #3

        Hmm.. I understand that. Seeing I come from a system administrator background I have enjoyed reading a couple of the RFC's in the past ;-) However: I am not transmitting files over the socket. The actual question is: are there gotcha's in protocol design (for instance i found out that having an parameter to let the client detect when the command is done is an abolute must).?

        L 1 Reply Last reply
        0
        • N Noctris

          Hmm.. I understand that. Seeing I come from a system administrator background I have enjoyed reading a couple of the RFC's in the past ;-) However: I am not transmitting files over the socket. The actual question is: are there gotcha's in protocol design (for instance i found out that having an parameter to let the client detect when the command is done is an abolute must).?

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          Noctris wrote:

          are there gotcha's in protocol design (for instance i found out that having an parameter to let the client detect when the command is done is an abolute must).?

          Not sure what that means.

          Noctris wrote:

          It's my first Client/Server application and I feel like i am in the dark.

          Not unusual, it's a large subject.

          Noctris wrote:

          I've found very little on designing a protocol

          Yeah I don't remember ever seeing anything like that. Try looking at existing protocols rather than looking for something that teaches protocols. I suggest you start with some simple application level protocols like HTTP/FTP/POP3 of course...

          Noctris wrote:

          what i need (basic question/response and synchronizing data, which i currently do using xml)

          That sounds like SOAP so you may not need to create your own protocol. It's difficult to say for sure with the limited information you provided.

          led mike

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups