ServeFile Method
      
 

Description

Serves file through integrated web server.


Return Type

A XMPPFile object. 


Syntax

object.ServeFile Filename, MaxConn

The ServeFile Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodXMPP.
Filename Required. A String value. Full path to the file that will be sent.
MaxConn Required. A Long value. Defines maximum number of connections to accept.

Remarks

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.