Login  
Search All Forums
Dart Home | PowerTCP Sockets for .NET | Custom Development Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
AuthorForum: PowerTCP Sockets for .NET (Secure and Standard)
Topic: What is Otp?
WinstonSmith

From: Calgary, AB Canada
Posts: 17
Member Since: 06/11/06
posted July 25, 2006 11:56 AM

Was wondering what exactly Otp means in your samples. I thought this was a socket control and you can choose between Otp and Sockets when you import the Dart.PowerTCP into the program. What is the difference?

Thanks!!
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted July 25, 2006 12:31 PM

Hi,
First, please be sure to examine the readme that is included with the OTP sample.

OTP is a demonstrative sample that is included in the Sockets and SSLSockets products.
It consists of three projects - a Library, a Client, and a Server.
OTP is something we designed.

The OTP Library is simply a class that provides an interface for writing and reading .NET serializable objects (and files as a special case) to/from a stream.
It actually has nothing specifically to do with sockets.

For example, you could use the OTP library to save an object as a file using a FileStream.
You could then read in the object from the file.

The OTP client and server applications use the Sockets library in conjunction with the OTP library to send and receive objects across a network.
In this case, instead of a FileStream, the stream is a data stream that gets sent between the two apps.

To summarize, the OTP library is not part of the Sockets library, nor is it dependent on it.
However, it can be used in conjunction with the Sockets library to write a client-server solution for transferring objects across the network.

Hope this clarifies,
-ken
WinstonSmith

From: Calgary, AB Canada
Posts: 17
Member Since: 06/11/06
posted July 25, 2006 12:48 PM

So by sending a file using your Otp program i am not using the socket for communication? What is it using? Sorry, i am a newbie in this area. Our client wanted to use sockets for transfer, is this comparable?
WinstonSmith

From: Calgary, AB Canada
Posts: 17
Member Since: 06/11/06
posted July 25, 2006 12:51 PM

Hit enter too quick, Which example should i use for a client server app where the server can have many clients connecting to it and transfering files at once? Would the Otp still be fine and stable as users grow?

Thanks for the quick reply!!
WinstonSmith

From: Calgary, AB Canada
Posts: 17
Member Since: 06/11/06
posted July 25, 2006 12:53 PM

One last question, is there the possibility you have an app like i described built that can be purchased? Source code etc for a client server file transfer app that i can expand on which uses sockets?
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted July 25, 2006 1:49 PM

Hi,
Ok, I apologize for not being clear.
Let me try a different approach...

The Sockets for .NET product contains several components that developers can use in their own applications.
Two of the more prominent components are the Tcp component and the Server component.

The Tcp component can be used to write client apps that connect and transfer data to servers.
The Server component can be used to write server apps that listen for client connections.

Included with the Tool is an "OTP" sample, which includes a client sample app and a server sample app.
Generally speaking, this sample demonstrates sending and receiving data between a client and server.
Specifically, the data transferred in this sample are serialized objects and files.

In order for clients and servers to communicate with one another, they must use a protocol that both sides understand.
Example protocols include FTP, HTTP, SMTP, etc.
In this sample, the protocol used is something we made up, called "OTP."

The client sample app uses the OTP library to take an object or file and construct a "message" that the Tcp component can send.
The server sample app uses the OTP library to take the message received by the Server component, and decode it back into an object or file.

So, to answer your questions -
1. The samples use the Tcp and Server components for communication.
OTP is used to encode and decode the data sent.

2. The Server component can handle numerous simultaneous connections.
Any of the included server apps (Echo, Chargen, OTP Server) can be used as examples of this.

3. Questions you should ask yourself are -
Does our server have to support an existing protocol?
Or do I have to come up with my own protocol?
Are there existing clients that must be able to communicate with my server?
Do I have to write the clients as well?

The OTP sample was designed as a protocol for transferring objects and files.
One option would be to write client and server apps (similar to the samples) that use this protocol.

Otherwise, custom development work may be an option.
If this interests you, please contact David Harry (sales@dart.com).

-ken
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX