func (this *FTPClient) WriteDataSocket(message string) {
	writer := bufio.NewWriter(this.dataSocket)
	_, err := writer.WriteString(message + "\r\n")
	if err != nil {
		fmt.Println("Error occurred writing to data socket connection: " + err.Error())
		return
	}
	err = writer.Flush()
	if err != nil {
		fmt.Println("Error occurred flushing data socket stream: " + err.Error())
	}
}
Write a string to the client's data socket.
package ftp
import (
	"net"
	"fmt"
	"bufio"
	"strings"
	"strconv"
)
type FTPClient struct {
	server 			*FTPServer
	conn 			net.Conn  
	writer 			*bufio.Writer
	scanner 		*bufio.Scanner
	authenticated   bool
	user 			string
	password 		string
	dir				string
	relativedir		string
	transferType 	string
	Mode			int
	dataSocket 		net.Conn  
}
func (this *FTPClient) HandleRequest(req string) {
	request := strings.SplitAfterN(req, ` `, 2)
	command := strings.Trim(request[0], ` `)
	if len(request) > 1 {
		message := strings.Trim(request[1], ` `)
		fmt.Println("Command: " + command + ", message: " + message)
		switch command {
		case "USER":
			this.USER(message)
		case "PASS":
			this.PASS(message)
		case "TYPE":
			this.TYPE(message)
		default:
			this.NOTIMP()
		}
	} else {
		fmt.Println("Command: " + command)
		switch command {
		case "PASV":
			this.PASV()
		case "QUIT":
			this.QUIT()
		case "SYST":
			this.SYST()
		case "FEAT":
			this.FEAT()
		case "PWD":
			this.PWD()
		case "LIST":
			this.LIST()
		default:
			this.NOTIMP()
		}
	}
}
func (this *FTPClient) SendMessage(code int) {
	message := GetMessages()[code]
	completeMsg := strconv.Itoa(code) + " " + message
	this.Write(completeMsg)
	fmt.Println(completeMsg)
}
func (this *FTPClient) SendMessageWithInjectable(code int, injectable string) {
	message := GetMessages()[code]
	completeMsg := strconv.Itoa(code) + " " + message
	completeMsg = strings.Replace(completeMsg, "%s", injectable, -1)
	this.Write(completeMsg)
	fmt.Println(completeMsg)
}
func (this *FTPClient) Write(message string) {
	_, err := this.writer.WriteString(message + "\r\n")
	if err != nil {
		fmt.Println("Error occurred writing to connection: " + err.Error())
		return
	}
	err = this.writer.Flush()
	if err != nil {
		fmt.Println("Error occurred flushing data stream: " + err.Error())
	}
}