473,796 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with UDP Broadcast

I have the following piece of code:

Dim udpClient As New UdpClient
Dim MyData = "1234567890 ABC"
udpClient.Conne ct("255.255.255 .255", 999)
Dim sendBytes As [Byte]() = Encoding.ASCII. GetBytes(MyData )
udpClient.Send( sendBytes, sendBytes.Lengt h)
The puzzle is that MyData has to be greater than 13 bytes to work. Any less
and it simply doesn't send out a packet (I have a network analyser to check
this).

I've also tried the following with no effect.

udpClient.Enabl eBroadcast = True
udpClient.DontF ragment = True
udpClient.Multi castLoopback = False
This has me baffled. Any ideas?

-Jerry
Jul 30 '06 #1
1 2255

"Jerry Spence1" <je**********@s omewhere.comwro te in message
news:44******** *************** @ptn-nntp-reader01.plus.n et...
>I have the following piece of code:

Dim udpClient As New UdpClient
Dim MyData = "1234567890 ABC"
udpClient.Conne ct("255.255.255 .255", 999)
Dim sendBytes As [Byte]() = Encoding.ASCII. GetBytes(MyData )
udpClient.Send( sendBytes, sendBytes.Lengt h)
The puzzle is that MyData has to be greater than 13 bytes to work. Any
less and it simply doesn't send out a packet (I have a network analyser to
check this).

I've also tried the following with no effect.

udpClient.Enabl eBroadcast = True
udpClient.DontF ragment = True
udpClient.Multi castLoopback = False
This has me baffled. Any ideas?

-Jerry

The other thing I've noticed is that the data sent out is always one byte
less than what MyData is. So for the above I only get "1234567890 AB". My
example is exactly the same as on the MSDN site, so could this be a bug?

-Jerry
Aug 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1530
by: Zitan Broth | last post by:
Greetings All, I compiled pg from source last week as pg 7.3.4 which worked sweet. Then Idecided there was some functionality in 7.4beta that I just needed to lookat :-) So I: *stopped pg *downloaded the source *deleted data dir *configured, gmake, gmake install *init db
10
1541
by: Alex | last post by:
Hi, I have a problem with quoting in one of my functions: now TIMESTAMP := ''now''; FOR myRec IN SELECT * FROM myTable WHERE job_end + ''360 Min'' > now LOOP I want to replace the 360 with the contents of a passed value but for some reason I can't quote it. ... job_end + ''$1 Min'' does not work.
4
2611
by: Ron St-Pierre | last post by:
I wish to insert data into a table from a very large text file (from a cron script) using COPY. However if the lName (TEXT), fName(TEXT), workDate(DATE) already exist I don't want to insert data and just want to move onto the next record. Is there any way I can tell my bash script/COPY to ignore the case where the unique constraint exists (lName,fName,workDate), and move on to the next record? ps 7.4, debian stable TIA Ron
6
2782
by: Chris Ochs | last post by:
I want to do a series of inserts within a single transaction block, but with postgresql if one insert fails, the whole block is aborted. Is there any way to get around this behavior so that postgresql won't abort the entire transaction if a single insert returns an error? Chris ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
11
2709
by: Ben Marklein | last post by:
I'm trying to migrate from 7.2 to 7.4.1 via pg_dump/pg_restore and have encountered a couple of problems: 1) Index creation on a table fails: db=# CREATE UNIQUE INDEX person_info_username_ix ON person_info USING btree (username); ERROR: could not create unique index DETAIL: Table contains duplicated values.
3
2338
by: Ryan Riehle | last post by:
Hi All! Trying to upgrade to Apache 2.0.49 and getting compile errors related to mod_auth_pgsql, any clue?: make: Entering directory `/usr/src/httpd-2.0.49' /usr/src/httpd-2.0.49/srclib/apr/libtool --silent --mode=link gcc -pthread -I/ =500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER I. -I/usr/src/httpd-2.0.49/os/unix -I/usr/src/httpd-2.0.49/server/mpm/prefork -I .49/modules/proxy
33
3035
by: wespvp | last post by:
When I try to run thread_test.c from the CVS tip, it hangs in an infinite CPU loop on both linux (RedHat AS 3.0, gcc 3.2.3) and Mac OS X 10.3.3 (gcc 3.3). I've also tried down to gcc 2.96 on Mac OS X. If I compile it with -g instead of -O2 on linux, it runs to completion and gives me: Add this to your template/$port file: STRERROR_THREADSAFE=yes
8
2158
by: BARTKO, Zoltán | last post by:
Hello, folks, I am trying to install pgsql8 on winxp. I tried first to install "as is" with pginstaller beta2-dev3, no luck, it froze, switched off Nod32, froze a little later, ran through the list of services, switched off anything that seemed to be a firewall, no luck. So I compiled beta3 with mingw, installed, and now initdb keeps telling me this:
7
5466
by: Timo Haberkern | last post by:
Hi there, i have some troubles with my TSearch2 Installation. I have done this installation as described in http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_compound_words <http://www.sai.msu.su/%7Emegera/oddmuse/index.cgi/Tsearch_V2_compound_words> I used the german myspell dictionary from http://lingucomponent.openoffice.org/spell_dic.html and converted it with my2ispell
2
6599
by: Gunnar_Frenzel | last post by:
Hello, this might be an easy question, but I don't have any handy solution at hand. I have an application that is supposed to send UDP broadcast. So far so easy, I did: Socket sockSendBroadcast = null; IPEndPoint ipeSendBroadcast = null; ipeSendBroadcast = new IPEndPoint(IPAddress.Broadcast, iSomePort);
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10006
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7547
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.