In this article, we would discuss about Socket Programming.
Socket programming is a way of connecting two nodes on a network to communicate with each other.
A Socket is an End-Point of To and From (Bidirectional) communication link between two programs (Server Program and Client Program ) running on the same network.
A Server Socket Program running on a computer has a socket that bound to a Port Number on the same computer and listening to the client's incoming requests.
A Client Socket Program have to know the IP Address (Hostname) of the computer that the C# Server Socket Program resides and the Port Number assign for listening for client's request .
Communication protocol used for Socket Programming is TCP/IP ( Transmission Control Protocol/Internet protocol).
Code:
I have created a dll for the same which takes Input as IpAddress, PortNumber and Input Message and returns Response Message.
Variable Declaration:
Navision Code:
.Net dll Code:
Code Download Link: Socket Programming
That's it !!!
I hope this would help you a lot. Please also let me know your views.
Your valuable comments and feedback are appreciated.
Hi Suraj,
ReplyDeleteI don't know how to make Dynamics access the dll.
When I go to declare Socket, I can't see the dll.
What should I do?
Hello Jobell,
ReplyDeleteAfter downloading the dll from above code download link, kindly place that dll at below locations in NAV Folder and then declare variable for same.
Example for NAV 2015 Folder Location:
C:\Program Files\Microsoft Dynamics NAV\80\Service
C:\Program Files\Microsoft Dynamics NAV\80\Service\Add-ins
Hello Jobell,
ReplyDeletehave ypu also an example about tcpserver?