Programming
c# and android communication

Question Description

I’m studying and need help with a Programming question to help me learn.

i had alreay provided

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

Final Answer

I don't think there is anything wrong in your server code. You are getting the output "Try i = 1" because you are writing this text to console in your server code. See the below line:

Console.WriteLine("Outside Try i = {0}", i.ToString());
try
            {
socket = listeningSocket.Accept(); . . .

It will just print this and wait till a connection is made to the server from the client. This is what I understand. Did you try to connect to the server using the client? If the connection is successful then other messages will be printed to console, or the client is not able to reach the server. 

If the client is able to reach the server and then if there are any issues, then the messages in the catch block will be printed. Can you post what messages you are exactly seeing on the screen?

Thanks!



fixit (96)
UCLA

Anonymous
Top quality work from this tutor! I’ll be back!

Anonymous
Heard about Studypool for a while and finally tried it. Glad I did caus this was really helpful.

Anonymous
Thank you! Reasonably priced given the quality

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4