Running Socket program Down.!!!

Running Socket program Down.!!!

Postby yunbg1 » Sun Nov 20, 2005 8:20 am

Hi Antonio !

May I ask you a question.
Sample program check over....

SERVER(PC) -> CLIENT(PPC) OK !
SERVER(PC) <- CLIENT(PPC) Not Receive !


Test 1############

/*----------------------------------------------------------------------*/
WSAStartup()
nSocket := Socket( AF_INET, SOCK_STREAM, IPPROTO_IP )
BindToPort( nSocket, 2550 )

WSAAsyncSelect( nSocket, oWnd:hWnd, 0, ;//WM_ASYNCSELECT,;
nOr( FD_ACCEPT, FD_OOB, FD_READ, FD_CLOSE, FD_CONNECT, FD_WRITE ) )
ConnectTo( nSocket, 2550, "192.168.10.102" )
RETU NIL

:D result -> SocKet Init OK ! & Receive / Send OK !


Test 2############

/*----------------------------------------------------------------------*/
oSocket = TSocket():New( 2000 )
oSocket:bRead = { | oSocket | MsgInfo( oSocket:GetData() ) }
// Never use a MsgInfo() here because it hangs Windows!!!
oSocket:bConnect = { || }
oSocket:bClose = { || MsgInfo( "Server has closed!" ) }
oSocket:Connect( "192.168.0.15" ) // use the server IP address here

/*----------------------------------------------------------------------*/
this Source program----> problem \source\tsocket.prg

::cIPAddr = GetHostByName( GetHostName() )

-------------Ploblem!!!!!!!!!!!!!!!!!!

:cry: result ->program close & down !!!

Test 3############

/*----------------------------------------------------------------------*/
WSAStartup()
nSocket := Socket( AF_INET, SOCK_STREAM, IPPROTO_IP )
BindToPort( nSocket, 2550 )

WSAAsyncSelect( nSocket, oWnd:hWnd, 0, ;//WM_ASYNCSELECT,;
nOr( FD_ACCEPT, FD_OOB, FD_READ, FD_CLOSE, FD_CONNECT, FD_WRITE ) )
ConnectTo( nSocket, 2550, "192.168.10.102" )

SocketSend( nSocket, "A")
cData := ''
su := seconds()
do while .t.
nRetCode := Recv(nSocket, @cData)
if nRetCode == -1
exit
endi
if seconds() - su > 4 //4 sec wait
exit
endi
endd
Msginfo(cData)

seconds() Function use....

:cry: result -> WindowCE Display Message Window :
TITLE : "not implemented yet" Message : _ftime()

:cry: result -> WindowCE Display Message Window :
TITLE : "not implemented yet" Message : localtime()



Test Model !!!
------------------------------------------------------------------------------
1. HP-RW6100 Mobile PDA
2. HHP Dolphin 9550 RF Scanner
------------------------------------------------------------------------------
Last edited by yunbg1 on Tue Nov 22, 2005 3:38 pm, edited 2 times in total.
FWH User
FWPPC User
FWLinux User
yunbg1
 
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

Re: Running Socket program Down.!!!

Postby yunbg1 » Tue Nov 22, 2005 3:41 pm

Hi All
Help me please !!!
FWH User
FWPPC User
FWLinux User
yunbg1
 
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

Postby Antonio Linares » Tue Nov 22, 2005 6:36 pm

We are going to check it as soon as possible. We have been busy cause 2.7 version launch.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41362
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Jon Munro » Tue Nov 22, 2005 10:51 pm

Yunbg1,
You may use the function time() to give hh:mm:ss then calculate seconds.
hth
User avatar
Jon Munro
 
Posts: 42
Joined: Sun Oct 09, 2005 11:47 am
Location: Brisbane Australia

Postby yunbg1 » Fri Nov 25, 2005 1:47 am

Hi Antonio.

When can i get the program which you are checking now.

Best Regards.
FWH User
FWPPC User
FWLinux User
yunbg1
 
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 8 guests