ServeFile method will open up internal web server to serve your
file to other contacts. It is used internally for sending files if
remote contact doesn't support file transfers, but prefers to get
file using provided URL. ServeFile method will create this URL and
start serving the file, allowing up to MaxConn total number
of connections. When total number of connections has been made, file
will be removed from the collection.
You can provide URL of returned file to other contacts, just
provide them with correct
DataIP address and port (stored in
DataPort). You can
provide any IP of your computer, since ServeFile will bind all
adapters.
Return value of ServeFile method is newly created
XMPPFile object, where you
can set up other properties, or access them if needed, at later
time.
If you want to provide unlimited number of connections in
MaxConn argument, set it to -1.