openTCPstream in loop ?

Blitz3D Forums/Blitz3D Beginners Area/openTCPstream in loop ?

Prym(Posted 2014) [#1]
Have I to place the OpenTCPStream command in the main loop, or is it exclued ?
I don't find any info in the forums . (I have not read all)

I know how to use AcceptTCPStream ( in the loop ) ,
but I am in doubt concerning OpenTCPStream .
It seems that this is slowing the main loop speed .
Is that command like CreateTCPServer , and may be called only in the beginning , before the loop .

Thanks .


Wings(Posted 2014) [#2]
Hi

Yes one can put it anywhere in code. but it will make program slow.

like 8000 ms delays. Specialy if it fails.

I recomend look at code arcive and find your own way.

Remember after open a stream dont Close it. instead reuse the stream untill it breaks of it self.

1) OpenTCPStream
2) In main Loop use the stream with WriteBytes,Readbytes.

(not to me self To optimise Blitz basic TCP ip never send more than 1800 bytes untill recived its a feature not a bug. if you do it also slow down :/)


Gauge(Posted 2014) [#3]
Years ago I was making a mud, and i have a little code. I don't know what type of file your trying to open/stream. whats the purpose of the stream?

if your attempting to send information, then a tcp stream should always stay open. Then pass information from the server to the client using writeline, and readline or readbyte.

If your stream needs to open/close you should be using udp.


I'd be more than happy to give you a sample, server, client, game, whatever.


Gauge(Posted 2014) [#4]
OH a little code:

note while keep a tcp stream open, you have to make sure you have a stream avail with information or blitz shuts down.

(probably too much)

[/B]
global server


server=createtcp server()
if not server then
print "server failed to start"
end
elseif
print "*connected"
endif

While() ;main loop
stream=acceptcpstream(server)
If stream then
p.player =new player
p\stream=stream
writeline p\stream, "Whats your name?"
delay 100 ;nothing else to put here yet

and check each stream
for p.player=each player
if readavail(p\stream) msg$=readline(p\stream)
;;;;or yyou could use the following:
;;;;while readavail(p\stream) then
;;;;b=readbyte(p\stream)
;;;;msg$=msg$+chr$(b)
;;;;wend
for pp.player=each player
writeline pp\stream msg$
next
endif

wend

type Player
field stream
field name
field msg$
end type


Prym(Posted 2014) [#5]
An extract of my code , the 'play' loop .
Why does Not it work when I suppress
the two lines with OpenTCPStream And with CloseTCPStream ?
I have Not used Type declarations For MULTIplayers yet , only arrays .





;;;;

; inits ...
;if serverexist then
; partie = joinnetgame = 1 ...
;else
;createserver
; partie = hostnetgame = 2 ...

strStream48cli = OpenTCPStream ( adresserveur$ , 8080 ) ; , 1 )
; 1 : absolutely needed for a local net/play ???





While Not KeyHit ( 27 )

If MULTI = True Then
For Nmodele = 0 To 3
PositionEntity playerMULTI ( Nmodele ) , Xplayer0MULTI ( Nmodele ) , Yplayer0MULTI ( Nmodele ) , Zplayer0MULTI ( Nmodele ) ; , 1
RotateEntity playerMULTI ( Nmodele ) , pitchplayer0MULTI ( Nmodele ) , yawplayer0MULTI ( Nmodele ) , rollplayer0MULTI ( Nmodele ) ; , 1
Next
EndIf


; CaptureWorld
UpdateWorld
RenderWorld ; tween#
Flip


If MULTI = True Then
Xplayer0MULTI ( numplayer0 ) = EntityX ( player0 , 1 )
Yplayer0MULTI ( numplayer0 ) = EntityY ( player0 , 1 )
Zplayer0MULTI ( numplayer0 ) = EntityZ ( player0 , 1 )
pitchplayer0MULTI ( numplayer0 ) = EntityPitch ( player0 , 1 )
yawplayer0MULTI ( numplayer0 ) = EntityYaw ( player0 , 1 )
rollplayer0MULTI ( numplayer0 ) = EntityRoll ( player0 , 1 )
If partie = 2 Then
strStream48ser = AcceptTCPStream ( TCP48 )
If strStream48ser <> 0 Then
Nmodele = ReadInt ( strStream48ser )
playerID ( Nmodele ) = ReadInt ( strStream48ser )
numplayer0pris ( Nmodele ) = ReadInt ( strStream48cli )
Xplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
Yplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
Zplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
pitchplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
yawplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
rollplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
For Nmodele = 0 To 3
WriteInt strStream48ser , Nmodele
WriteInt strStream48ser , playerID ( Nmodele )
WriteInt strStream48ser , numplayer0pris ( Nmodele )
WriteInt strStream48ser , Xplayer0MULTI ( Nmodele )
WriteInt strStream48ser , Yplayer0MULTI ( Nmodele )
WriteInt strStream48ser , Zplayer0MULTI ( Nmodele )
WriteInt strStream48ser , pitchplayer0MULTI ( Nmodele )
WriteInt strStream48ser , yawplayer0MULTI ( Nmodele )
WriteInt strStream48ser , rollplayer0MULTI ( Nmodele )
Next
EndIf
ElseIf partie = 1 Then
; strStream48cli = OpenTCPStream ( adresserveur$ , 8080 ) ; ( DottedIP$ ( HOSTplayerID ) , 8080 )
; If strStream48cli <> 0 Then
WriteInt strStream48cli , numplayer0
WriteInt strStream48cli , playerID ( numplayer0 )
WriteInt strStream48cli , numplayer0pris ( numplayer0 ) ; 1 ;
WriteInt strStream48cli , Xplayer0MULTI ( numplayer0 ) ; EntityX ( player0 , 1 ) ;
WriteInt strStream48cli , Yplayer0MULTI ( numplayer0 ) ; EntityY ( player0 , 1 ) ;
WriteInt strStream48cli , Zplayer0MULTI ( numplayer0 ) ; EntityZ ( player0 , 1 ) ;
WriteInt strStream48cli , pitchplayer0MULTI ( numplayer0 ) ; EntityPitch ( player0 , 1 ) ;
WriteInt strStream48cli , yawplayer0MULTI ( numplayer0 ) ; EntityYaw ( player0 , 1 ) ;
WriteInt strStream48cli , rollplayer0MULTI ( numplayer0 ) ; EntityRoll ( player0 , 1 ) ;
For Nmodele = 0 To 3
cubemodele = ReadInt ( strStream48cli ) ; Nmodele = ; cubemodele = sa dépane
playerID ( Nmodele ) = ReadInt ( strStream48cli )
numplayer0pris ( Nmodele ) = ReadInt ( strStream48cli )
Xplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
Yplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
Zplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
pitchplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
yawplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
rollplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
Next
; CloseTCPStream strStream48cli
; EndIf
EndIf

Wend





CloseTCPStream strStream48cli

End





;;;;


Gauge(Posted 2014) [#6]
what is your good doing/not doing from when you the the open/close tcp streams enabled and what does it do when disabled?

Do not reopen a tcpstream, you should only open a tcpstream when the player connects. Then that stream remains open. until they are done playing. And keep your server stream open.

I can't really make heads/tails out of your code, however have declared the streams as a global? global strstream48ser and you client streams if not. I think your losing some info/data somewhere, make sure all your globals are declared.

Also the more write/reads you have write int to stream etc the more slow down your going to have. It would be better for you to add them all to one line writethem and readthem. Good luck


Guy Fawkes(Posted 2014) [#7]



Prym(Posted 2014) [#8]
Hello Gauge,
Thank you for your precisions .
I will go back to my PC and try some things.
I have to translate (oups!) exactly what you mean.
I wonder where in my code the datas are lost and the stream closed.
The datas are all globals and no other trace of closestream in my code .
See you.
Thank.


Prym(Posted 2014) [#9]
Hello to all the members of the blitzbasic forum
Is there someone who can help me to correct my LAN game Galaxang (space 3D) ?
I have put the multiplayer chunk of the main loop .
I have modified? it and expose it in this post .
Status :
I have connected two Windows 7 home PCs with a blue LAN cable in their net plugs . My net is declared as "Reseau indefini" (FR : windows 7 "net and connections" page ) .
Is it normal ?
Can it be the reason why my program loop does not work ?
Is there a configuration in windows that I have to do to use a LAN net ?

The loop chunk works with this line :
; strStream48cli = OpenTCPStream ( adresserveur$ , 8080 ) ; ( DottedIP$ ( HOSTplayerID ) , 8080 )
But it slows too much the loop, and I know I don't have to do like that .

Thank you for your answers and suggestions .
The Gauge example does not work anymore for me .

.pabonreso










If MULTI = True Then

If parentplayer0 = pivotterrainchateau Then
Xplayer0MULTI ( numplayer0 ) = EntityX ( player0 , 0 ) ; Xplayer0
Yplayer0MULTI ( numplayer0 ) = EntityY ( player0 , 0 )
Zplayer0MULTI ( numplayer0 ) = EntityZ ( player0 , 0 )
; pitchplayer0MULTI ( numplayer0 ) = EntityPitch ( player0 , 0 )
; yawplayer0MULTI ( numplayer0 ) = EntityYaw ( player0 , 0 )
; rollplayer0MULTI ( numplayer0 ) = EntityRoll ( player0 , 0 )
Else ; If parentplayer0 = 0 , pivotTEMP , ou autres Then
Xplayer0MULTI ( numplayer0 ) = EntityX ( player0 , 1 )
Yplayer0MULTI ( numplayer0 ) = EntityY ( player0 , 1 )
Zplayer0MULTI ( numplayer0 ) = EntityZ ( player0 , 1 )
; pitchplayer0MULTI ( numplayer0 ) = EntityPitch ( player0 , 1 )
; yawplayer0MULTI ( numplayer0 ) = EntityYaw ( player0 , 1 )
; rollplayer0MULTI ( numplayer0 ) = EntityRoll ( player0 , 1 )
EndIf
pitchplayer0MULTI ( numplayer0 ) = EntityPitch ( player0 ) ; , 1 )
yawplayer0MULTI ( numplayer0 ) = EntityYaw ( player0 ) ; , 1 )
rollplayer0MULTI ( numplayer0 ) = EntityRoll ( player0 ) ; , 1 )

If KeyHit ( 57 ) Stop ; 57 = Espace ; DebugLog verifs

If partie = 2 Then

strStream48ser = AcceptTCPStream ( TCP48 )
DebugLog "TCP48 = " + TCP48
DebugLog "strStream48ser = " + strStream48ser
; DebugLog "ReadAvail ( strStream48ser ) = " + ReadAvail ( strStream48ser )
; DebugLog "strStream48cli = " + strStream48cli
; DebugLog "ReadAvail ( strStream48cli ) = " + ReadAvail ( strStream48cli )
If strStream48ser <> 0 Then
If ReadString$ ( strStream48ser ) = "coordscli" Then
Nmodele = ReadInt ( strStream48ser )
playerID ( Nmodele ) = ReadInt ( strStream48ser )
numplayer0pris ( Nmodele ) = ReadInt ( strStream48ser )
Xplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
Yplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
Zplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
pitchplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
yawplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
rollplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
EndIf
; EndIf
WriteString strStream48ser , "coordsser"
For Nmodele = 0 To 3
WriteInt strStream48ser , Nmodele
WriteInt strStream48ser , playerID ( Nmodele )
WriteInt strStream48ser , numplayer0pris ( Nmodele )
WriteInt strStream48ser , Xplayer0MULTI ( Nmodele )
WriteInt strStream48ser , Yplayer0MULTI ( Nmodele )
WriteInt strStream48ser , Zplayer0MULTI ( Nmodele )
WriteInt strStream48ser , pitchplayer0MULTI ( Nmodele )
WriteInt strStream48ser , yawplayer0MULTI ( Nmodele )
WriteInt strStream48ser , rollplayer0MULTI ( Nmodele )
Next
DebugLog "TCP48 = " + TCP48
DebugLog "strStream48ser = " + strStream48ser
; DebugLog "ReadAvail ( strStream48ser ) = " + ReadAvail ( strStream48ser )
; DebugLog "strStream48cli = " + strStream48cli
; DebugLog "ReadAvail ( strStream48cli ) = " + ReadAvail ( strStream48cli )
; CloseTCPStream strStream48ser
EndIf

ElseIf partie = 1 Then

; strStream48cli = OpenTCPStream ( adresserveur$ , 8080 ) ; ( DottedIP$ ( HOSTplayerID ) , 8080 )
; DebugLog "TCP48 = " + TCP48
; DebugLog "strStream48ser = " + strStream48ser
; DebugLog "ReadAvail ( strStream48ser ) = " + ReadAvail ( strStream48ser )
DebugLog "strStream48cli = " + strStream48cli
DebugLog "ReadAvail ( strStream48cli ) = " + ReadAvail ( strStream48cli )
If strStream48cli <> 0 ; And ReadAvail ( strStream48cli ) = 0 Then
WriteString strStream48cli , "coordscli"
WriteInt strStream48cli , numplayer0
WriteInt strStream48cli , playerID ( numplayer0 )
WriteInt strStream48cli , numplayer0pris ( numplayer0 ) ; 1 ;
WriteInt strStream48cli , Xplayer0MULTI ( numplayer0 ) ; EntityX ( player0 , 1 ) ;
WriteInt strStream48cli , Yplayer0MULTI ( numplayer0 ) ; EntityY ( player0 , 1 ) ;
WriteInt strStream48cli , Zplayer0MULTI ( numplayer0 ) ; EntityZ ( player0 , 1 ) ;
WriteInt strStream48cli , pitchplayer0MULTI ( numplayer0 ) ; EntityPitch ( player0 , 1 ) ;
WriteInt strStream48cli , yawplayer0MULTI ( numplayer0 ) ; EntityYaw ( player0 , 1 ) ;
WriteInt strStream48cli , rollplayer0MULTI ( numplayer0 ) ; EntityRoll ( player0 , 1 ) ;
If ReadString$ ( strStream48cli ) = "coordsser" Then
For Xmodele = 0 To 3
Nmodele = ReadInt ( strStream48cli ) ; Nmodele = cubemodele = : sa dépane
playerID ( Nmodele ) = ReadInt ( strStream48cli )
numplayer0pris ( Nmodele ) = ReadInt ( strStream48cli )
Xplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
Yplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
Zplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
pitchplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
yawplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
rollplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
Next
EndIf
; DebugLog "TCP48 = " + TCP48
; DebugLog "strStream48ser = " + strStream48ser
; DebugLog "ReadAvail ( strStream48ser ) = " + ReadAvail ( strStream48ser )
DebugLog "strStream48cli = " + strStream48cli
DebugLog "ReadAvail ( strStream48cli ) = " + ReadAvail ( strStream48cli )
EndIf

EndIf

EndIf


Guy Fawkes(Posted 2014) [#10]
Prym.. Please use "[ codebox][ /codebox]" (remove the spaces) around your source code so it doesn't take up the whole forum.

Thank You!

Sincerely,

~GF


Wings(Posted 2014) [#11]
Prym

please read this post its explains tcpip networking sample.
its clearly wee need turtorial about this :)

http://www.blitzbasic.com/Community/posts.php?topic=76772


Prym(Posted 2014) [#12]
Hi Wings and Guy Fawkes,
Thank you for your suggestion.
I run to read this post .

I hope that my question has been posted in the right place .
I have asked if my local net configuration was correct .
I am in doubt about it .
I am not connected to internet . Can some configuration be missing ?
Is it enough for testing my LOCAL multiplayer section ?
I see that the client stream is cut for every pass of my program loop .

Thanks
I can go and try .


Guy Fawkes(Posted 2014) [#13]
Please see my K-Netlib thread for help with networking!


Wings(Posted 2014) [#14]
here a full example. no downloads. i hacked this yesterday :)

unlimitet players 10.000 limit.
its unstable code to be small smal as possible.
tested with 5 clients on my pc "localhost" with no lagg.

feel free to use, improve and sale it :)




Guy Fawkes(Posted 2014) [#15]
Nice, Wings!


Prym(Posted 2014) [#16]
I thank you , Wings , but please ,
I would like someone to tell me what is wrong in my code .

Now I think that the acceptTCPstream command
may not be present in main loop . Is it right ?

I omissed to say that I already had written
my LAN inits code for server and players
( partie = 2 = HostNetGame and partie = 1 = JoinNetGame ) ,
and it seems working well to define the streams and players .

The problem is in my loop code .
I have hope that you read that few lines
to suggest what is definitely wrong or nocive in my loop code .

Note : When I use OpenTCPstream at every round,
the transmissions are working ( but slowly )

Thank you for your patience(fr?~) .


Guy Fawkes(Posted 2014) [#17]
Please see my K-Netlib thread for help with networking!


It's easier with the K-Netlib. Trust me.


Wings(Posted 2014) [#18]
OpenTCP stream will take a while. dont do it every frame :)


Prym(Posted 2014) [#19]
Hello ,

Thank you Wings for this confirmation about OpenTCPStream (not in loop)

Thank you Guy Fawkes for the reference to K-NNetlib .
I have gone , download the materials , began to resd .
But I think it's too much evolued for me .
OK, I have to translate all that in french . It would be better .
It seems a big tool , and the server/client config is not the same to me .
I am a little beginner forever .

Thank you for your help .
We'll try .


Prym(Posted 2014) [#20]
Hi Wings,
Here are some things I'd like to precise to you .

I am not internet connected . My two Win 7 PCs are both connected with a blue LAN cable .
Is it the reason why the IP adress, localhost or 127.0.0.1, is not present on my machines (two Win7 PCs) ?

The "full example" that you indicate to me does not work .
I think my personal streams code could work well . I don't know, now .
My problem is perhaps the config and connections of my PCs/net .
Is there somebody who can light the way to me ?


Wings(Posted 2014) [#21]
1) make suer the lan Cable is a crossover Cable. and not straigt.
http://en.wikipedia.org/wiki/Ethernet_crossover_cable

2) You need to set ip adress of your network card on both computers.

pc1
ip 192.168.0.5 Mask 255.255.255.0
(Gateway its not used but usaly set to 192.168.0.1)

pc2
ip 192.168.0.10 mask 255.255.255.0
(Gateway its not used but usaly set to 192.168.0.1)


to test connectivity and share files printers you need to turn of your firewall on both computers. usaly

try use the ping command from pc1

start / run / cmd
ping 192.167.0.10

you sold get respond ?


Prym(Posted 2014) [#22]
Hi, Wings,
and thank you to take care of my problem.

I had set the same IP for the server and the client ( server PC )
And as you tell me , I'll turn off both firewalls .
Thanks for the info of the ping command in the command line .
And I have to check the LAN cable .

I will come back to the forum to say if it runs or not .
I see a little light, enough for me for keeping to work .


Prym(Posted 2014) [#23]
Hello Wings

I bought a network cable "crossover".
I disabled the firewalls for both my Win7 PCs (x64 and x86).
This still does not work.

Neither my program nor your example "fullexample."

For my program, I set the same IP address
(169.254.66.224 server PC) for the server and the client.
For your fullexample I tested with "127.0.0.1" and "169.254.66.224".

My network are displayed as "Reseau indefini" (undefined network)?

I know it's not BB3D,
but can you give me some suggestions?

Thank you for your efforts.


Wings(Posted 2014) [#24]
the ip adress 169.254.66.224 is a local never goes online adress.

try change ip adress

Computer 1
ip 192.168.0.10
mask 255.255.255.0
gateway

Computer 2
ip 192.167.0.11
mask 255.255.255.0

After set ip adresses run cmd.exe from computer1
ping 192.168.0.11

se if you get respond.


Prym(Posted 2014) [#25]
Hello Wings,

Another remark :
I want to have a LAN play on a local network .
Server and players are using the same ip adress .
Can I use the ip adress 169.254.66.224 in this case ?
And how ? ( it doesn't work well at this time )

Thank you for your precise technical answers .
I go and try all these IP configurations .
And I'll Come back to inform you about success .

http://www.prymprog.wikeo.net


Wings(Posted 2014) [#26]
I dont trust the 169.254.66.224. i got bad experiance about it. as working on it department in 1997.

i keep a Eye on this thread later..


Prym(Posted 2014) [#27]
Hello Wings,

I want to tell you that my prog does not work with the IP changes.
The ping tests have worked well .
Even my routine initiation of the network does not work.

I remind you that I like to have a local multiplayer (to see, for starters).
What do you think of the multiplayer code, which I introduced earlier, for my main loop? What comments? What evidence?

I rewrite here (simplified):

Xplayer0MULTI ( numplayer0 ) = EntityX ( player0 , 1 )
Yplayer0MULTI ( numplayer0 ) = EntityY ( player0 , 1 )
Zplayer0MULTI ( numplayer0 ) = EntityZ ( player0 , 1 )
pitchplayer0MULTI ( numplayer0 ) = EntityPitch ( player0 ) , 1 )
yawplayer0MULTI ( numplayer0 ) = EntityYaw ( player0 ) , 1 )
rollplayer0MULTI ( numplayer0 ) = EntityRoll ( player0 ) , 1 )

If partie = 2 Then

strStream48ser = AcceptTCPStream ( TCP48 )
If strStream48ser <> 0 Then
If ReadString$ ( strStream48ser ) = "coordscli" Then
Nmodele = ReadInt ( strStream48ser )
playerID ( Nmodele ) = ReadInt ( strStream48ser )
Xplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
Yplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
Zplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
pitchplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
yawplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
rollplayer0MULTI ( Nmodele ) = ReadInt ( strStream48ser )
EndIf
EndIf
WriteString strStream48ser , "coordsser"
For Nmodele = 0 To 3
WriteInt strStream48ser , Nmodele
WriteInt strStream48ser , playerID ( Nmodele )
WriteInt strStream48ser , Xplayer0MULTI ( Nmodele )
WriteInt strStream48ser , Yplayer0MULTI ( Nmodele )
WriteInt strStream48ser , Zplayer0MULTI ( Nmodele )
WriteInt strStream48ser , pitchplayer0MULTI ( Nmodele )
WriteInt strStream48ser , yawplayer0MULTI ( Nmodele )
WriteInt strStream48ser , rollplayer0MULTI ( Nmodele )
Next
; CloseTCPStream strStream48ser
EndIf

ElseIf partie = 1 Then

; strStream48cli = OpenTCPStream ( adresserveur$ , 8080 ) ; ( DottedIP$ ( HOSTplayerID ) , 8080 )
If strStream48cli <> 0 ; And ReadAvail ( strStream48cli ) = 0 Then
WriteString strStream48cli , "coordscli"
WriteInt strStream48cli , numplayer0
WriteInt strStream48cli , playerID ( numplayer0 )
WriteInt strStream48cli , Xplayer0MULTI ( numplayer0 ) ; EntityX ( player0 , 1 ) ;
WriteInt strStream48cli , Yplayer0MULTI ( numplayer0 ) ; EntityY ( player0 , 1 ) ;
WriteInt strStream48cli , Zplayer0MULTI ( numplayer0 ) ; EntityZ ( player0 , 1 ) ;
WriteInt strStream48cli , pitchplayer0MULTI ( numplayer0 ) ; EntityPitch ( player0 , 1 ) ;
WriteInt strStream48cli , yawplayer0MULTI ( numplayer0 ) ; EntityYaw ( player0 , 1 ) ;
WriteInt strStream48cli , rollplayer0MULTI ( numplayer0 ) ; EntityRoll ( player0 , 1 ) ;
If ReadString$ ( strStream48cli ) = "coordsser" Then
For X = 0 To 3
Nmodele = ReadInt ( strStream48cli )
playerID ( Nmodele ) = ReadInt ( strStream48cli )
Xplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
Yplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
Zplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
pitchplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
yawplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
rollplayer0MULTI ( Nmodele ) = ReadInt ( strStream48cli )
Next
EndIf
EndIf

EndIf

EndIf


Guy Fawkes(Posted 2014) [#28]
Wings, please use translator so others can understand what you need help with. :) Thank You!


Prym(Posted 2014) [#29]
Hello ! It is traduced , now ...
Can I have your help ?


Wings(Posted 2014) [#30]
Hey Prym

Good to hear ping now works

Try somthing simpler first to get know TCPIP.
like sending a Hello World to other computer.


Prym(Posted 2014) [#31]
I would like to put my init routine for Lan in the forum .
I have make mistakes the last time I tried .
Can you tell me how to do exactly ?
Could I put it in or after these lines ?

This routine works well and I'd like to keep it for my project .
My pb is in the main loop I have already put in the forum .

Thank you for your answer and effort .