Socket streaming

BlitzMax Forums/BlitzMax Programming/Socket streaming

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

ok, got this further now, i can redirect the server by using two sockets /streams, it seems they have to run side by side for the redirect to work, only thing i need now is to do the authentification parth which is done via https as per this

n e idea how i can do this? here is updated code (again a bit sloppy):
SuperStrict
Global socket:TSocket[3];
Global stream:Tsocketstream[3];
Global ipaddress:String;
socket[0]=CreateTCPSocket();
socket[1]=CreateTCPSocket();
socket[2]=CreateTCPSocket();
Global xx:String;
If ConnectSocket (socket[0],HostIp("messenger.hotmail.com"),1863)  Then
	Print "Socket Connected"
	stream[0] = CreateSocketStream(socket[0]);
	If (stream[0]) Then
		Print "stream created";
		WriteLine (stream[0],"VER 1 MSNP8 CVR0\r\n");
		Print ReadLine(stream[0]);
		WriteLine(stream[0],"CVR 2 0x0409 win 5.10 i386 MSNMSGR 7.0.0816 MSMSGS me@...");
		Print ReadLine(stream[0]);
		WriteLine (stream[0],"USR 3 TWN I me@...");
		xx = ReadLine(stream[0]);
		Print xx;
	End If
	
Local	count:Int=0;
Local	collect:Int=0;
	Repeat
		count=count+1;
		If Mid(xx,count,1)=2 Then collect = 1;
		If collect = 1 Then 
			'If Mid(xx,count,1)<> "." Then 
			ipaddress=ipaddress+Mid(xx,count,1);
			'EndIf
		EndIf
	Until Mid(xx,count+1,1)=":"
	

	Print ("Connecting to " + ipaddress);
	
	If ConnectSocket (socket[1],HostIp(ipaddress),1863)
		Print("Connected");
		stream[1] = CreateSocketStream(socket[1]);
		WriteLine (stream[1],"VER 4 MSNP8 CVR0\r\n");
		Print ReadLine(stream[1]);
		WriteLine (stream[1],"CVR 5 0x0409 win 4.10 i386 MSNMSGR 5.0.0544 MSMSGS me@...");
		Print ReadLine(stream[1]);
		WriteLine (stream[1],"USR 6 TWN I me@...");
		Print ReadLine(stream[1]);
	Else 
		Print("Unable to connect");
	EndIf
	
EndIf

CloseStream(stream[0]);
CloseSocket(socket[0]);
CloseStream(stream[1]);
CloseSocket(socket[1]);