473,386 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to use BlockSource of SetSocketOption for Socket

1
Hi Guys,

I am using Socket for UDP communication in C#. My application send receive data using Socket. While sending data, I am sending data on same port where I am receiving it, Other server listen that port and pulls data. So I want to make sure data sent to port is not received by my receiver. How can I block data received from same machine.

I am thinking of using BlockSource option under SetSocketOption but I am not able to set it's value I tried using bool, string, IPEndPoint data point but I am getting "invalid value" error.

Any input..

Thanks
Sep 30 '07 #1
1 2047
This solves all my sockets problems

http://www.codeproject.com/useritems/winsock2005.asp
Oct 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Nathan Kerr | last post by:
I have been working with KB Article 812404 "HOW TO: Write Pluggable Protocol to Supprot FTP in Managed Classes by Using Visual Bassic.NET". I have modified the code to run on a Pocket PC. In the...
2
by: Wencheng Magiya | last post by:
By setting socket.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.KeepAlive, 1 ) can tell the socket to use keep-alives. But anybody know how to set the timeout for the keep-alive...
3
by: Ryan Liu | last post by:
Hi, I use Server: Use an endless thread to lisiten to clients requests: while(true) { TcpClient client = myListener.AcceptTcpClient();
0
by: morgan22 | last post by:
Hi I'm trying to build a sniffer-like application and I'm using this code : Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw,...
1
by: =?Utf-8?B?aXdkdTE1?= | last post by:
hi, im trying to send a broadcast out to my network using a UDP socket. heres how i initialize it. Dim soc As New Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.Udp) i get...
2
by: carl.rosenberger | last post by:
Hi, I am trying to get the following behaviour for my Socket connection: (1) Attempt a blocked read for a defined amount of time. (2) If a timeout occurs, because no data has been sent to the...
4
by: O.B. | last post by:
I have a socket configured as TCP and running as a listener. When I close socket, it doesn't always free up the port immediately. Even when no connections have been made to it. So when I open...
0
by: cmrhema | last post by:
Hi, We have an asynchronous server socket program, which works fine BUT, when due to some circumstances, I receive null data or blank data, the server goes to infinite loop Here is the code ...
3
by: A. W. Dunstan | last post by:
I'm creating a socket as follows: m_networkSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); m_networkSocket.LingerState = new LingerOption(true, 1);...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.