TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mann Maurya
NA
104
9.5k
Sending Data using LAN port
Jun 11 2019 6:20 AM
I am trying to send data through lan port using port:1080;
The following code is working fine till MessageId1:127,
when MessageId1:128 or more than that code not working
MessageId0=000;
MessageId1=128;
public void SenData()
{
hexString = "007" + MessageId0 + MessageId1 + "000003000000000" + MessageId0 + MessageId1 + "002";
HexString2Ascii(hexString);
msgSend = System.Text.Encoding.ASCII.GetBytes(Label1.Text);
stream.Write(msgSend, 0, msgSend.Length);
}
private string HexString2Ascii(string hexString)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i <= hexString.Length - 3; i += 3)
{
sb.Append(Convert.ToString(Convert.ToChar(Int32.Parse(hexString.Substring(i, 3), System.Globalization.NumberStyles.Number))));
}
Send = sb.ToString();
return sb.ToString();
}
pls Suggest any changes in code.
pls Help guys!
thanks !
Reply
Answers (
1
)
Insert List Data using Ajax call in mvc
How to Display Awaiting Processsing