Results 1 to 5 of 5

Thread: Socket helper classes

  1. #1
    Lesser Wizard
    Join Date
    Nov 2010
    Location
    Los Angeles, California, United States, United States
    Posts
    126

    Default Socket helper classes

    Looks like you have some networking code in P+. Would you recommend using that for some basic p2p (TCP) networking, or are those classes meant for something else?

    Looking into NetDog too (recommended from the Irrlicht page), but it may be too much for what I need.

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

    Default

    The simple networking stuff in p+ works nice for downloading files but for gaming I was thinking of using this. (I like the free licensing and it seems simple enough to understand) but I am just getting started and have a lot to figure out, especially I need to work out the best server/licensing system that won't give me firewall/nat issues.

    I'm starting work on a 3D multi player shooter type game so we'll probably both be running into the same issues for a while..
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Lesser Wizard
    Join Date
    Nov 2010
    Location
    Los Angeles, California, United States, United States
    Posts
    126

    Default

    Nice! Well for now, I'm just looking to transport simple commands over TCP (all on same WLAN).

  4. #4
    Lesser Wizard
    Join Date
    Nov 2010
    Location
    Los Angeles, California, United States, United States
    Posts
    126

    Default

    enet looks pretty cool. Was able to compile it with Win32, but got errors in xcode (below). Let me know if you have any clues!

    Code:
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ctime:68: error: '::tm' has not been declared
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ctime:70: error: '::clock' has not been declared
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ctime:71: error: '::difftime' has not been declared
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ctime:72: error: '::mktime' has not been declared
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ctime:73: error: '::time' has not been declared
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ctime:74: error: '::asctime' has not been declared
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ctime:75: error: '::ctime' has not been declared
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ctime:76: error: '::gmtime' has not been declared
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ctime:77: error: '::localtime' has not been declared
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ctime:78: error: '::strftime' has not been declared
    In file included from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/locale:46,
                     from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/ostream.tcc:46,
                     from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/ostream:572,
                     from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/iostream:45,
                     from /Users/bryancdickson/Development/CTI/jmvd/proj/mac/../../src/proton/shared/PlatformSetup.h:35,
                     from /Users/bryancdickson/Development/CTI/jmvd/proj/mac/../../src/proton/shared/PlatformPrecomp.h:6:
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc: In member function '_InIter std::time_get<_CharT, _InIter>::_M_extract_via_format(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*, const _CharT*) const':
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1839: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1846: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1854: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1861: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1873: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1880: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1883: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1895: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1900: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1908: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1912: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1932: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1968: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:1976: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc: In member function 'virtual _InIter std::time_get<_CharT, _InIter>::do_get_weekday(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*) const':
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:2210: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc: In member function 'virtual _InIter std::time_get<_CharT, _InIter>::do_get_monthname(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*) const':
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:2259: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc: In member function 'virtual _InIter std::time_get<_CharT, _InIter>::do_get_year(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*) const':
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/locale_facets.tcc:2288: error: invalid use of incomplete type 'struct tm'
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    In file included from ../../src/proton/shared/util/boost/boost/detail/spinlock_gcc_arm.hpp:12,
                     from ../../src/proton/shared/util/boost/boost/detail/spinlock.hpp:34,
                     from ../../src/proton/shared/util/boost/boost/detail/spinlock_pool.hpp:25,
                     from ../../src/proton/shared/util/boost/boost/detail/sp_counted_base_spin.hpp:22,
                     from ../../src/proton/shared/util/boost/boost/detail/sp_counted_base.hpp:62,
                     from ../../src/proton/shared/util/boost/boost/detail/shared_count.hpp:29,
                     from ../../src/proton/shared/util/boost/boost/shared_ptr.hpp:32,
                     from ../../src/proton/shared/util/boost/boost/smart_ptr.hpp:18,
                     from ../../src/proton/shared/util/boost/boost/signals/connection.hpp:14,
                     from ../../src/proton/shared/util/boost/boost/signals/signal_template.hpp:18,
                     from ../../src/proton/shared/util/boost/boost/signals/signal0.hpp:24,
                     from ../../src/proton/shared/util/boost/boost/signal.hpp:19,
                     from /Users/bryancdickson/Development/CTI/jmvd/proj/mac/../../src/proton/shared/Renderer/Surface.h:17,
                     from /Users/bryancdickson/Development/CTI/jmvd/proj/mac/../../src/proton/shared/Renderer/SurfaceAnim.h:13,
                     from /Users/bryancdickson/Development/CTI/jmvd/proj/mac/../../src/proton/shared/Renderer/RenderBatcher.h:13,
                     from /Users/bryancdickson/Development/CTI/jmvd/proj/mac/../../src/proton/shared/BaseApp.h:18,
                     from /Users/bryancdickson/Development/CTI/jmvd/proj/mac/../../src/proton/shared/PlatformPrecomp.h:7:
    ../../src/proton/shared/util/boost/boost/detail/yield_k.hpp: In function 'void boost::detail::yield(unsigned int)':
    ../../src/proton/shared/util/boost/boost/detail/yield_k.hpp:123: error: 'nanosleep' was not declared in this scope

  5. #5
    Lesser Wizard
    Join Date
    Nov 2010
    Location
    Los Angeles, California, United States, United States
    Posts
    126

    Default

    Update: I've got it compiling. Had to rename enet/include/enet/time.h to something else.

    Nothing running yet but I'll let you know.

Similar Threads

  1. Help me plz. Socket.
    By Aikidos in forum Official ClanLib SDK Forums
    Replies: 18
    Last Post: 05-08-2010, 08:51 PM
  2. Question about moving from CL_Surface to 2.1 classes
    By Nightwind0 in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 01-20-2010, 06:00 PM
  3. Socket Assert
    By catch22 in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 07-20-2007, 05:31 AM
  4. Race condition in network classes
    By Niklas in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 09-22-2006, 12:11 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
  •