Repeat TCP information Sending

BlitzPlus Forums/BlitzPlus Beginners Area/Repeat TCP information Sending

ok fine I can do that... All I did was have the program send everything I wanted it to using the writeline command, then I used an EOF, readline command on the recieving end. anyways heres the code AND it's in the format that wol pointed out to me, although I still can't get it to work.
 Print "working..."
Global xdir2$ = ""
Global xdir
Global xname$ = "C:"

While Not tcphome
	TCPHome=OpenTCPStream("XXX.XXX.XXX.XXX",8080)
Wend

WriteString TCPHome,GetEnv("computername")
CloseTCPStream tcphome
Delay(1000)
If TCPHome <> 0
	Delay(100)
	xdir = ReadDir(xname$)
	While Not file
		FILE=OpenTCPStream("XXX.XXX.XXX.XXX",8080)
	Wend
	Repeat
		xdir2$=NextFile$(xdir)
		If xdir2 = "" Then Exit
		If FileType(xname$+""+xdir2) = 2
			WriteLine FILE,("Folder: " + xname$ + xdir2)
		Else
			WriteLine FILE,("File: " + xname$ + xdir2)
		End If
		Delay(10)
	Forever
	WriteLine file,"Program Successfully Executed.  Exiting Now"
	CloseTCPStream file
End If

Print "done!" 


and
Global fileout
Remote=CreateTCPServer(8080)

If Remote<>0 Then 
	Print "Server started successfully."
Else
	Print "Server failed to initialize."
	Delay(2000)
	End
End If 

Print "awaiting connection..."

While stream = 0
	stream=AcceptTCPStream(Remote)
Wend

Compname$ = ReadString$(stream)

Print "Connected To Computer " + Compname + " at "
Print DottedIP$(TCPStreamIP(stream))
If FileType("C:" + Compname + ".txt") Then DeleteFile("C:" + Compname + ".txt")
fileout=WriteFile("C:" + Compname + ".txt")

Delay(10000)

stream = AcceptTCPStream(remote)

While Not Eof(stream)
	Linein$ = ReadLine(stream)
	Print linein
	WriteLine(fileout,linein)
Wend

While Not KeyDown(1)
Wend