Socket Programming and Threading Using C#
Socket Programming and Threading Using C#
Repository Link:
https://www.dropbox.com/s/drqbxvqvdahd1hi/SOCKET%20PROGRAMMING%20and%20Threading%
20C%23.rar?dl=0
Members List
Member Roll No
Name
CGPA
BCSF13M053
Aleena Raza
2.75
BCSF13M041
Aneeba Khalid
2.89
BCSF13M054
M.Tayyab Tariq
3.15
a) sleep()
b) terminate()
c) suspend()
d) Abort()
Which of these method of Thread class is used to Suspend a thread for a period
of time?
a) sleep()
b) terminate()
c) suspend()
d) stop()
Which namespace is used for socket programming in C#?
a) System. Threading
b) System.Net.Socket
c) System.IO
d) None of these
Which class is used for UDP server in C#?
a) UDPClient
b) UDPServer
c) UDPProtocol
d) All of these
If thread is aborted () once it cannot be
a) aborted again
b) Join again
c) Start again
d) All of these
Which exception is thrown on safety of threads
a) ThreadStateException
b) ThreadException
c) Exception
d) None of these
Each Thread defines a unique flow of
a) Programs
b) Objects
c) Control
d) Executions
A dead State means for thread is
a) The thread has completed its execution
b) The thread is not safe
c) The thread is aborted
d) Both a & c
A TCPClient constructor takes two arguments
a) IPAddress and Portno
b) Portno and IPAddress
c) IPaddress and DNS
d) None of these
A Network Stream is a class in
a) System.NET
b) System.NET.Sockets
c) System. NETWORK. STREAMS
d) None of these
A Network Stream is used for
a) Connecting between client and server
b) Reading and writing data
c) It is used to get IPAddress
d) It is used to get Portno of host machine
A Network Stream passed data in the form of
a) Bytes
b) ASCII Codes
c) UNI Codes
d) All of these
-------------- Blocks the calling thread until a thread terminates
a) Join
b) Wait
c) Abort
d) Sleep
A thread is not executable when
a) Sleep method is called
b) Wait method is called
c) Blocked for I/O operations
d) All of these
TcpListener is used to monitor a TCP port for incoming requests and then create either a
Socket or a TcpClient
a) True
b) False
c) Only TCP Client
d) None of these are true
For UDP we must specify everytime
a) Portno
b) IPAddress
c) Both a & b
d) None of these to specify