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: ERROR
brianza
brianza@compunet.com.mt

From: Mosta, Malta
Posts: 5
Member Since: 07/26/06
posted July 26, 2006 3:14 PM

Why is it that when I past the following into Vb. Net. I get Type 'Datagram' is not defined.
and 'Debug' is not declared.



' Listen on the default interface and an ephemeral port.
Udp1.Open()

' Send a datagram to a echo server
Dim s as String = "test"

' Send the string s to the host "MyEchoServer" on port 7.
Udp1.Send(s, "MyEchoServer", 7)

' Receive the echoed data
Dim d as Datagram = Udp1.Receive(s.Length)

' Display the data.
Debug.WriteLine(d.ToString())
Amit

From: Rome, NY USA
Posts: 315
Member Since: 03/15/06
posted July 26, 2006 5:13 PM

Hello,

I have read your query and it is my understanding that you are getting an error message “DataGram is not defined”.

If this is the said scenario, then please note that the said error message generally appears because the DataGram class is situated at Dart.PowerTCP.Sockets.Datagram. so, I would suggest you to please follow the following steps:

(1) Add a reference to Dart.PowerTCP.Sockets.dll

(2) In your project, import the class as follow
Imports Dart.PowerTCP.Sockets

Regarding the error message “Debug not declared”, I would suggest you to please make sure that the public class is inheriting the Form class like in the following code:

Public Class Form1
Inherits System.Windows.Forms.Form


I hope this will be of help. In case of further assistance/ clarifications, please feel free to write back and I would be glad to assist you.

Have a nice day ahead.

Best Regards,
Amit
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX