http listener url and port

I need to build a listener that grabs all traffic coming into our network from

A particular url
A specific port.
Larry Bristersr. DeveloperAsked:
Who is Participating?
 
Dave BaldwinFixer of ProblemsCommented:
If this is the same project, you need to find out if and where you can actually see that traffic.  Two tools that can help you determine what is going on are TCPView http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx from Microsoft Sysinternals and Wireshark http://www.wireshark.org/.  If you can't see it, you can't grab it.  The only place you can 'guarantee' that you can see it is at your 'gateway' device which is your incoming router or modem, a place that All the traffic goes thru.
0
 
Larry Bristersr. DeveloperAuthor Commented:
DaveBaldwin

The VOIP folks we're dealing with has a Java based jar that works like a listener and can be executed from my dev PC's command prompt.

So, that seems to me that I can grab it as well.


I have Eclipse so I can look at the source code.

The source Java essentially connects to their url (First yellow highlight)
Does a "PrintIn" that lets me know it's monitoring (Second yellow highlight
And then when something happens Prints the data to screen with a PrintIn as well...which COULD be sent to a database with a PrepareDOcument process in Java. (third yellow highlight)

I'm essentially trying to replicate that in .Net
And my director has stated he wants it done with a Listener in .Net

And I have ZERO experience with a Listener.

ss
0
 
CodeCruiserCommented:
I do not have a lot of experience with Java but it appears that VOIP guys have their own Library(M5Connection). Have you asked them to see if they have .NET libraries?
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
Larry Bristersr. DeveloperAuthor Commented:
CodeCruiser

Yeah...they have it for Professional Fees wich my company doesn't want to pay for.

I have 5 weeks to figure this out.

I've done this with Asterisk.Net elsewhere...
But management is insisting this be done this way.  Making me crazy.

I DO have the code for the connection...in Java of course.

Looks like I'll just have to clomp my way through this.

The code below is how the Java code begins...
I'll probably be making a lot of Java to C# to VB.Net conversions...with EE questions.

And so the journey begins.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.Socket;
import java.net.URL;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;

import javax.net.SocketFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;

/**
 * This class is used to connect to M5 API servers and send
 * commands and receive responses as XML fragments using HTTP1.1
 * chunked encoding.
 */
public class M5Connection
{
	public static final String urlBase = "/bobl/bobl";
	public static final String ENCODING = "ISO-8859-1";
	public static final String DELIMITER = "\r\n";
	protected URL url;
	private InputStream inputStream;
	protected OutputStream outputStream;
	protected Socket socket;
	protected BufferedReader reader;
	private boolean bProcessedHeaders;

	protected String resp = null;
	protected String errorMessage = null;

Open in new window

0
 
CodeCruiserCommented:
Ah so you have code for M5Connection class. Then its a matter of converting it to .NET. Good luck.
0
 
Dave BaldwinFixer of ProblemsCommented:
At least you have something to work with.  Have you seen the TCPClient and TCPListener class code on this page: http://msdn.microsoft.com/en-us/library/sb27wehh%28v=vs.71%29.aspx
0
 
Larry Bristersr. DeveloperAuthor Commented:
Thanks guys
0
 
Dave BaldwinFixer of ProblemsCommented:
You're welcome, thanks for the points.  That must be some expensive software for them to want to pay you for 5 weeks instead of buying the code.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.