tcp-ip

TCP/IP Client Socket Program in C#.Net Using IP Address And Port Number

大城市里の小女人 提交于 2019-11-30 10:29:54
TCP/IP Client Socket Program. Here My Main Requirement is Client Send Message and server receive message and store in database table in C#.Net, Using Server IP Address and Port Number. You are talking about a simple Server-Client program. What you need to do. Create a server program and run it first Create a client and connect to your running server using Connect("SERVER IP", PORT) Now when client is connected to server, receive message to server use database conenctions to store that message in database Guides : Write server - http://csharp.net-informations.com/communications/csharp-server

Hazelcast in multinode docker environments with TCPIP

孤者浪人 提交于 2019-11-30 09:43:44
I am currently struggling with the following problem: I have a Java EE application that shall be able to run in a cluster (it actually does). For the data exchange between the nodes I use Hazelcast 3.3.3. Since our customers are afraid of UDP we use TCP. So I configure 3 hazelcast parameters per node: The network interface to use, the port and the members of the cluster. In real life (not a docker environment) everything works. Now I want to put my Java EE servers into docker containers (one per node) and also link them via Hazelcast. What I did was: On the host machine running the docker

How to establish a SSL enabled TCP/IP Connection in Ruby

孤街浪徒 提交于 2019-11-30 09:01:35
I need to establish a TCP connection with my server which has a SSL enabled port, that I need to access. I need to send a XML file and get the response from the server. Before the SSL was enabled, I was able to get the data from the server using the below mentioned code. require 'socket' myXML = 'test_xml' host = 'myhost.com' port = 12482 socket = TCPSocket.open(host,port) # Connect to server socket.send(myXML, 0) response = socket.recvfrom(port) puts response socket.close Now I have a 'certi.pfx' with which I need to establish a connection, Send my_xml data and get the response. How can this

Printing directly to a thermal printer using ESC/POS Commands executed in C# with an interface of TCP/IP

和自甴很熟 提交于 2019-11-30 07:29:35
I was working on implementing ESC/POS(Epson Standard Code for Point of Sale) on a Kitchen printer(Aclas KP71M). I have a user interface the the POS user enters its string in to the user interface and the strings entered by the user will be sent to the printer and the printer prints the data. The printer interface with the host computer using Ethernet(100M) using TCP/IP connection. I have managed to embed each of the necessary commands in to a C# method and I also take some sample code on server/client C# connection and tried to include that in to my connection. The problem I am facing right

How to reconnect to a socket gracefully

别说谁变了你拦得住时间么 提交于 2019-11-30 03:41:13
I have a following method that connects to an end point when my program starts ChannelSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); var remoteIpAddress = IPAddress.Parse(ChannelIp); ChannelEndPoint = new IPEndPoint(remoteIpAddress, ChannelPort); ChannelSocket.Connect(ChannelEndPoint); I also have a timer that is set to trigger every 60 seconds to call CheckConnectivity , that attempts to send an arbitrary byte array to the end point to make sure that the connection is still alive, and if the send fails, it will attempt to reconnect. public bool

TCP/IP Client Socket Program in C#.Net Using IP Address And Port Number

橙三吉。 提交于 2019-11-29 15:49:43
问题 TCP/IP Client Socket Program. Here My Main Requirement is Client Send Message and server receive message and store in database table in C#.Net, Using Server IP Address and Port Number. 回答1: You are talking about a simple Server-Client program. What you need to do. Create a server program and run it first Create a client and connect to your running server using Connect("SERVER IP", PORT) Now when client is connected to server, receive message to server use database conenctions to store that

How to establish a SSL enabled TCP/IP Connection in Ruby

雨燕双飞 提交于 2019-11-29 12:20:16
问题 I need to establish a TCP connection with my server which has a SSL enabled port, that I need to access. I need to send a XML file and get the response from the server. Before the SSL was enabled, I was able to get the data from the server using the below mentioned code. require 'socket' myXML = 'test_xml' host = 'myhost.com' port = 12482 socket = TCPSocket.open(host,port) # Connect to server socket.send(myXML, 0) response = socket.recvfrom(port) puts response socket.close Now I have a 'certi

Printing directly to a thermal printer using ESC/POS Commands executed in C# with an interface of TCP/IP

女生的网名这么多〃 提交于 2019-11-29 09:42:43
问题 I was working on implementing ESC/POS(Epson Standard Code for Point of Sale) on a Kitchen printer(Aclas KP71M). I have a user interface the the POS user enters its string in to the user interface and the strings entered by the user will be sent to the printer and the printer prints the data. The printer interface with the host computer using Ethernet(100M) using TCP/IP connection. I have managed to embed each of the necessary commands in to a C# method and I also take some sample code on

simplest way to send raw Byte-arrays using Ruby's TCPSocket-Class

时光总嘲笑我的痴心妄想 提交于 2019-11-29 05:16:53
i want to send raw bytes using Rubys TCPSocket-Class. Has someone a good example? I've tried it in this way, but it does not work :( require 'socket' host = '192.168.0.80' port = 102 s = TCPSocket.new(host, port) s.write [0x03, 0x00, 0x00, 0x16, 0x11, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x00, 0xC1, 0x02, 0x02, 0x02, 0xC2, 0x02, 0x02, 0x02, 0xC0, 0x01, 0x0A ].pack('C') puts s.read s.close puts "exit" thanks :) Try using a "*" after the format directive to eat all the elements in the list: s.write [0x03, 0x00, 0x00, 0x16, 0x11, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x00, 0xC1, 0x02, 0x02, 0x02, 0xC2, 0x02,

Error:The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect

最后都变了- 提交于 2019-11-29 02:43:07
I am using Windows 7 Netbeans IDE 7.1.2 SQL Server Management Studio Express 2005 JDK1.6 I am getting the below error while connecting to the database: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect My connection string is: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); Connection connection = DriverManager.getConnection( "jdbc:sqlserver://127.0.0.1:1433;databaseName=dbcm;" + "user=sa;password=sa"); I've checked below things: In SQL Server Configuration Manager, Protocols for