Products Purchase Publishing Articles Support Company Contact |
support > Product FAQ > SpyWorks > Winsock |
|||||
Product FAQ Licensing System CC Factory Event Log Toolkit Gallimaufry IniFile Tool-5M LineGraph-5M NT Service Toolkit OneTime Download SpyWorks StateCoder StorageTools VBX Legacy VersionStamper Downloads Documentation Professional Services
|
SpyWorks SupportFrequently Asked Questions - Winsock
1. I am encountering a weird behavior with the SpyWorks WinSock component. I used the SpyWorks sample projects TCPclient and TCPServ successfully to connect to each other. However, I cannot get the SpyWorks TCPClient to connect to my "non-SpyWorks" TCP Server or vice versa. I have tried both Port 2000 and other arbitrary port numbers. There was a bug with our EchoTCP, TCP Client and TCP Server samples. Basically, we did not "dereference" the port address. So, our two TCP Client and Server samples worked fine together because they both had the same bug. But, these samples would not talk to other applications because the other applications probably correctly dereferenced the port address while ours did not. Download the following sample project to view a corrected sample project. ( tcpsamps.zip , 31KB) The following code changes fixes the problem in the original project: In tcpclient.frm: In: Sub Form_Load() Change: ListenAddr.Port = 2000 To: ' we'll set the port to 2000, but first must convert it into the ' Internet Standard format ListenAddr.Port = TCPSource.SocketsObject.Util.htons(2000) In tcpserv.frm: In: Sub Form_Load() Change: ListenAddr.Port = 2000 To: ' We want to set our server to listen at port 2000, but we need to ' convert 2000 to the Internet Standard format first ' (otherwise, we'll be listening port 53255) ListenAddr.Port = TCPSource.SocketsObject.Util.htons(2000) In: Sub TCPSource_AcceptComplete() Change: List1.AddItem "Connected to: " & TCPSource.SocketsObject.Util.inet_ntoa( NewSocketName.IpAddress) & " Port:" & NewSocketName.Port To: List1.AddItem "Connected to: " & TCPSource.SocketsObject.Util.inet_ntoa( NewSocketName.IpAddress) & " Port:" & TCPSource.SocketsObject.Util.ntohs(NewSocketName.Port) In: Sub TCPSource_SocketClosed() Change: List1.AddItem "Socket Closed: " & TCPSource.SocketsObject.Util.inet_ntoa( SourceSocket.SocketName.IpAddress) & " Port:" & SourceSocket.SocketName.Port To: List1.AddItem "Socket Closed: " & TCPSource.SocketsObject.Util.inet_ntoa( SourceSocket.SocketName.IpAddress) & " Port:" & TCPSource.SocketsObject.Util.ntohs(SourceSocket.SocketName.Port) In echotcp.frm: In: Sub Form_Load() Change: ListenAddr.Port = 2000 To: ListenAddr.Port = TCPSource.SocketsObject.Util.htons(2000) In: Sub TCPSource_AcceptComplete() Change: List1.AddItem TCPSource.SocketsObject.Util.inet_ntoa( NewSocketName.IpAddress) & " Port:" & NewSocketName.Port To: List1.AddItem TCPSource.SocketsObject.Util.inet_ntoa( NewSocketName.IpAddress) & " Port:" & TCPSource.SocketsObject.Util.ntohs(NewSocketName.Port)
This was a bug in our interpretation of the document. The dwUDP object now handles large udp messages correctly.
Some web sites requires a "Host Header" to be sent along on a HTTP "GET" request. Our component now sends that header along with every "GET" request.
We had a misprint in the help file for the AutoFileHeader function. The FileType's base value starts at 0 instead of 1, so it could be that the FileType is off by 1. For example, for an html file, set the FileType to 5 instead of 6.
We had a bug in the LoadCompressedLine function that would not send files with a certain size correctly. Run the SpyWorks run time files update to retrieve the latest SMTP component. |
|
|||
Products Purchase Articles Support Company Contact Copyright© 2012 Desaware, Inc. All Rights Reserved. Privacy Policy |
|||||