The c++ sfs.Connect() not worked

Post here your questions about the C++ API for SFS2X

Moderators: Lapo, Bax, MBagnati

g1111111g
Posts: 5
Joined: 29 Dec 2010, 11:53
Contact:

The c++ sfs.Connect() not worked

Postby g1111111g » 13 May 2016, 11:00

I just make a new cocos2dx project and all Additional lib configuration is good.but when i invoke like this:
m_ptrSmartFox->Connect( "127.0.0.1",9933 );
and debug step by step,I found that IP and port are not the value specified in the function but a random value.
please help me
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: The c++ sfs.Connect() not worked

Postby Lapo » 13 May 2016, 11:15

Hi,
I don't think I fully understand.

Is the connection not working? If so what error are you getting?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
g1111111g
Posts: 5
Joined: 29 Dec 2010, 11:53
Contact:

Re: The c++ sfs.Connect() not worked

Postby g1111111g » 13 May 2016, 11:55

Yah,I got this error when i invoke like this

m_ptrSmartFox->Connect( "127.0.0.1",9933 );

First-chance exception at 0x759AC42D in NewCocosProject.exe: Microsoft C++ exception: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> > at memory location 0x0059F3B0.
Unhandled exception at at 0x759AC42D in NewCocosProject.exe: Microsoft C++ exception: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> > at memory location 0x0059F3B0.
MBagnati
Posts: 126
Joined: 12 Feb 2013, 10:57

Re: The c++ sfs.Connect() not worked

Postby MBagnati » 17 May 2016, 13:42

Hi,
Please, can you give me additional information about the issue?

1) When you invoke

Code: Select all

   m_ptrSmartFox->Connect( "127.0.0.1",9933 );

is there a SmartFoxServer running in localhost or is switched off?

2) You say
I found that IP and port are not the value specified in the function but a random value.

Which value do you see?
Is value 8080 for IP Port?

3) You say that you have some exceptions when invoke m_ptrSmartFox->Connect
Do you see these exceptions only in debug's logger...or the exceptions go up to your application?

Thanks
Massimo
g1111111g
Posts: 5
Joined: 29 Dec 2010, 11:53
Contact:

Re: The c++ sfs.Connect() not worked

Postby g1111111g » 04 Jun 2016, 03:09

thanks,This issue was caused by VS2013 compiler settings.i already fix

Return to “SFS2X C++ API”

Who is online

Users browsing this forum: No registered users and 21 guests