Results 1 to 6 of 6

Thread: Network in IOS

  1. #1
    Lesser Wizard
    Join Date
    Feb 2013
    Posts
    142

    Default Network in IOS

    Dear all:

    I want to use class NetSocket of proton to read and write data in IOS

    Do i need startup like win32-WSAStartup in ios

    Have any idea startup socket in IOS?

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,380

    Default

    Everything works in iOS, you just do:

    NetSocket s;

    s.Init(ip, port) to be the client that connects to the server

    or s.InitHost(port) to be the server

    Then start using s.Write() and s.Read() to get data.

    Oh, you do need to call s.Update() each frame.

    No WSAStartup is needed. But initting the sockets may fail for a few seconds on the first connect in iOS, so be sure to check the return values and try again if needed.
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Lesser Wizard
    Join Date
    Feb 2013
    Posts
    142

    Default thanks a lot

    thanks a lot

    Quote Originally Posted by Seth View Post
    Everything works in iOS, you just do:

    NetSocket s;

    s.Init(ip, port) to be the client that connects to the server

    or s.InitHost(port) to be the server

    Then start using s.Write() and s.Read() to get data.

    Oh, you do need to call s.Update() each frame.

    No WSAStartup is needed. But initting the sockets may fail for a few seconds on the first connect in iOS, so be sure to check the return values and try again if needed.

  4. #4
    Lesser Wizard
    Join Date
    Feb 2013
    Posts
    142

    Default Addition question

    App game "Tanked" or anyother game

    1.does it use NetSocket connect to game server or use http Request?

    2.server send data to client, use socket or ios push service?

  5. #5
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,380

    Default

    Quote Originally Posted by feelthat View Post
    App game "Tanked" or anyother game

    1.does it use NetSocket connect to game server or use http Request?

    2.server send data to client, use socket or ios push service?
    Both Tanked and Growtopia use ENet (udp) primarily for communication.

    Both games also download files via http using Proton's NetHTTP which uses NetSocket (over tcpip) as well.

    I don't use iOS push events, everything is multi-platform friendly.
    Seth A. Robinson
    Robinson Technologies

  6. #6
    Lesser Wizard
    Join Date
    Feb 2013
    Posts
    142

    Default Gracias

    thanks again

    Quote Originally Posted by Seth View Post
    Both Tanked and Growtopia use ENet (udp) primarily for communication.

    Both games also download files via http using Proton's NetHTTP which uses NetSocket (over tcpip) as well.

    I don't use iOS push events, everything is multi-platform friendly.

Similar Threads

  1. Network UDP sockets
    By brunofls in forum Proton SDK
    Replies: 4
    Last Post: 09-27-2012, 12:35 AM
  2. Network Support?
    By Kirkkaf in forum Novashell Game Creation System
    Replies: 0
    Last Post: 09-19-2011, 01:55 AM
  3. Using the network framework
    By JoseMan in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 05-26-2010, 05:39 AM
  4. Is the Dink Network down?
    By Prophet422 in forum Dink Smallwood HD
    Replies: 1
    Last Post: 11-12-2004, 03:01 AM
  5. The Dink Network Is Down
    By redink1 in forum Dink Smallwood HD
    Replies: 6
    Last Post: 01-22-2003, 11:51 PM

Bookmarks

Bookmarks

Posting Permissions

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