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. C / C++ / MFC
  4. A question about Network Programming

A question about Network Programming

Scheduled Pinned Locked Moved C / C++ / MFC
questionsysadmintutorial
2 Posts 2 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
    nguyenvhn
    wrote on last edited by
    #1

    I have a plan to develop a Network Application. Suppose I have a class CServerData with a member function likes: CString CServerData::GetString() Here is a pseudo implementation of GetString function: CString CServerData::GetString(){ 1. Connect to Server 2. Send a request to Server 3. Wait until server answer 4. Return a CString } So that, in anywhere, I can write: CServerData server; CString st=server.GetString(); If I use CSocket, How can I implement that? It is better if you can give me a detail example. Thanks for reading.

    D 1 Reply Last reply
    0
    • N nguyenvhn

      I have a plan to develop a Network Application. Suppose I have a class CServerData with a member function likes: CString CServerData::GetString() Here is a pseudo implementation of GetString function: CString CServerData::GetString(){ 1. Connect to Server 2. Send a request to Server 3. Wait until server answer 4. Return a CString } So that, in anywhere, I can write: CServerData server; CString st=server.GetString(); If I use CSocket, How can I implement that? It is better if you can give me a detail example. Thanks for reading.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Why reinvent the wheel? How about just using NetServerGetInfo(..., 101, ...)?


      "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

      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