Click here to Skip to main content
15,911,715 members
Home / Discussions / C#
   

C#

 
GeneralProblem with DialogResult Pin
shea85111-Feb-08 11:10
shea85111-Feb-08 11:10 
GeneralRe: Problem with DialogResult Pin
shea85111-Feb-08 11:32
shea85111-Feb-08 11:32 
GeneralRe: Problem with DialogResult Pin
DaveyM6911-Feb-08 11:51
professionalDaveyM6911-Feb-08 11:51 
GeneralRe: Problem with DialogResult Pin
shea85111-Feb-08 12:18
shea85111-Feb-08 12:18 
GeneralMy project is not reflecting current changes Pin
R.A.C11-Feb-08 9:45
R.A.C11-Feb-08 9:45 
GeneralRe: My project is not reflecting current changes Pin
Pete O'Hanlon11-Feb-08 10:06
mvePete O'Hanlon11-Feb-08 10:06 
GeneralRe: My project is not reflecting current changes Pin
Luc Pattyn11-Feb-08 10:38
sitebuilderLuc Pattyn11-Feb-08 10:38 
QuestionUDP Send function sends duplicate data Pin
Chase Davis11-Feb-08 9:34
Chase Davis11-Feb-08 9:34 
I am trying to mimic the operation of a temperature transmitter that streams data via UDP. So, currently I have a program that sends data every second. For some reason, in my receive program, I receive each packet twice. Once from the correct IP address and the wrong port, and secondly from 0.0.0.0 ip address and the right port (8000). Here is my code. Does anyone have any suggestions?

// defined as a member of the form
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);

private void Form1_Load(object sender, System.EventArgs e)
{
EndPoint ipep = new IPEndPoint(IPAddress.Broadcast, 8000);
s.Connect(ipep);
}

private void timer1_Tick(object sender, System.EventArgs e)
{
// ignore the string part for now
string strLine = (string)lstData[cnt++];
if (cnt == lstData.Count)
cnt = 0;
byte[] data = Encoding.ASCII.GetBytes(strLine);
s.Send(data);
}

Chase Davis
GeneralRe: UDP Send function sends duplicate data Pin
led mike11-Feb-08 10:01
led mike11-Feb-08 10:01 
GeneralRe: UDP Send function sends duplicate data Pin
Chase Davis11-Feb-08 11:09
Chase Davis11-Feb-08 11:09 
GeneralRe: UDP Send function sends duplicate data Pin
led mike11-Feb-08 11:16
led mike11-Feb-08 11:16 
GeneralRe: UDP Send function sends duplicate data Pin
Chase Davis11-Feb-08 12:30
Chase Davis11-Feb-08 12:30 
GeneralRe: UDP Send function sends duplicate data Pin
led mike12-Feb-08 9:30
led mike12-Feb-08 9:30 
Generalan application for showing shared files using c# and .net Pin
addemy11-Feb-08 7:24
addemy11-Feb-08 7:24 
GeneralRe: an application for showing shared files using c# and .net Pin
led mike11-Feb-08 7:51
led mike11-Feb-08 7:51 
GeneralRe: an application for showing shared files using c# and .net Pin
addemy11-Feb-08 7:59
addemy11-Feb-08 7:59 
GeneralRe: an application for showing shared files using c# and .net [modified] Pin
led mike11-Feb-08 8:13
led mike11-Feb-08 8:13 
Generalsystem.drawing.color [modified] Pin
s3rro11-Feb-08 7:11
s3rro11-Feb-08 7:11 
GeneralRe: system.drawing.color Pin
led mike11-Feb-08 8:07
led mike11-Feb-08 8:07 
GeneralRe: system.drawing.color Pin
Insincere Dave11-Feb-08 8:34
Insincere Dave11-Feb-08 8:34 
GeneralRe: system.drawing.color Pin
led mike11-Feb-08 8:38
led mike11-Feb-08 8:38 
GeneralRe: system.drawing.color Pin
s3rro11-Feb-08 8:53
s3rro11-Feb-08 8:53 
GeneralRe: system.drawing.color Pin
Pete O'Hanlon11-Feb-08 10:16
mvePete O'Hanlon11-Feb-08 10:16 
QuestionRequest is not available in this context Pin
Ryno Burger11-Feb-08 6:18
Ryno Burger11-Feb-08 6:18 
GeneralRe: Request is not available in this context Pin
led mike11-Feb-08 6:22
led mike11-Feb-08 6:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.