interfacing with the Citadel/ux protocol

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by rmann.

Hi. I'm trying to interface with the Citadel/ux protocol. In order to do this, my application needs to connect to TCP port 504. Then after it's connected, it needs to authenticate to the Citadel/ux server by sending commands like "user rmann", then the return character to the server. I tried using the sendnetworkstring command, but that function doesn't seem to work for this purpose. Does Purebasic have an equivelent to RapidQ's socket.writeline and socket.readline functions? Thanks.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

I think you should use SendNetworkData():

Code: Select all

OpenNetworkConnection("your.citadelserver.com", 504)

string.s = "user rmann"+chr(13)+chr(10)
SendNetworkData(0, @string, Len(string))
And use ReceiveNetworkData() to receive server response. You should take a look to Fred's SendMail example, at http://www.reelmediaproductions.pb (Paul's site).

Bye,

El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tranquil.

sendnetworkstring can only be used with receivenetworkstring on the other side, couse these commands uses an own "internal-syntax".
It seems that it sends to packages of datas, the first tells the other side which type of datas has been send and the next one contains the string.

You can use the send_ API command for sending strings easilie. Its nearly the same syntax as the sendnetworkdata.

For receiving datas use recv_. Thats it. :)

Bye, Mike

Tranquilizer/ Secretly!
Registred PureBasic User
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by rmann.

Hi. Thanks for your help, but I think the link you gave to that send mail example was wrong.
I think you should use SendNetworkData():

Code: Select all

OpenNetworkConnection("your.citadelserver.com", 504)

string.s = "user rmann"+chr(13)+chr(10)
SendNetworkData(0, @string, Len(string))
And use ReceiveNetworkData() to receive server response. You should take a look to Fred's SendMail example, at http://www.reelmediaproductions.pb (Paul's site).

Bye,

El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

Paul's resource site:
http://www.reelmediaproductions.com/pb/


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.
Post Reply